I\'m trying to do something very simple in my first Rails app (Rails 3) and I\'m not sure what I\'m doing wrong, or if there\'s a better approach. Can\'t find anything on th
Add this line of code in your routes.rb file.
resources :work_requests do
member do
post 'new'
end
end
It shouldn't be the GET method because you're sending information to the server, via :module_id. This will then work.
<%= button_to("Add WorkRequest", {:controller => "work_request", :action => "new", :article_id => @article.id})%>