2010-08-01 44 views
2

我有這個和它的作品別名URL與西納特拉/ padrino

get :about, :map => '/about_us' do 
    render :erb, "<%= 'foo' %>" 
    end 
    get '/:slug' do 
    redirect "/about_us" # <-- 
    end 

可能以某種方式做「渲染」,而不是「重定向」? 或類似渲染的帖子/ 1'

回答

3
get :about, :map => '/about_us' do 
    render :erb, "<%= 'foo' %>" 
end 

get '/:slug' do 
    call env.merge('PATH_INFO' => '/about_us') 
end