我刚刚在我的rails(v3.0.1)应用程序中设置了Sinatra v1.1.0。但我不能调用是超过1级深的任何路由,这意味着该工程 - http://localhost/customer/3,Sinatra&Rails 3 routes issue
但是这一次不工作 - http://localhost/customer/3/edit,我得到一个“路由错误”
这里的西纳特拉对象
class CustomerApp < Sinatra::Base
# this works
get "/customer/:id" do
"Hello Customer"
end
# this does NOT work
get "/customer/:id/edit" do
"Hello Customer"
end
end
这是我在轨routes.rb中文件 -
match '/customer/(:string)' => CustomerApp
我猜我需要在航线网络的一些魔术乐?可能是什么问题呢?
routes.rb文件中有大量的例子被注释掉了。 – rwilliams 2010-11-16 07:25:22