1
我似乎无法找出2〜3如何从端口Rails的这个特定的路线:Rails的移植时,2路不认得我应用到Rails 3
map.resources :webservices, :new => { :push_data => :post, :reset_url => :post }
相关pastie是在这里:http://pastie.org/4022761
我似乎无法找出2〜3如何从端口Rails的这个特定的路线:Rails的移植时,2路不认得我应用到Rails 3
map.resources :webservices, :new => { :push_data => :post, :reset_url => :post }
相关pastie是在这里:http://pastie.org/4022761
好吧,我明白你在做什么。
你需要更新你的routes.rb文件,像这样:
resources :webservices do
post :push_data, :on => :new
post :reset_url, :on => :new
end
我这样做是为了一个模式,我有一个名为备注项目,当我叫耙路线,它给了我这样的:
push_data_new_note POST /notes/new/push_data(.:format) notes#push_data
reset_url_new_note POST /notes/new/reset_url(.:format) notes#reset_url
new_note GET /notes/new(.:format) notes#new
这应该解决你的路线问题。让我知道这是如何解决你的。
这很好用,谢谢! –
@PedroNascimento没问题。很高兴我能够提供帮助。 –