我有这个并且它有效
get :about, :map => '/about_us' do
render :erb, "<%= 'foo' %>"
end
get '/:slug' do
redirect "/about_us" # <--
end
可以用某种方式“渲染”而不是“重定向”吗? 或类似渲染'posts / 1'
答案 0 :(得分:3)
get :about, :map => '/about_us' do
render :erb, "<%= 'foo' %>"
end
get '/:slug' do
call env.merge('PATH_INFO' => '/about_us')
end