Hello there, I'm doing a form and I want to send this form with method="post". Head of form looks so:
<%= form_tag({ :controller => 'admin', :action => 'menu_add' }, { :method => 'post' }) do %>
And in controller I have this:
def menu_add menu_new = Menu.new(...) ... end
And with I am fighting - I'm not using type of route get 'admin/menu_add' - I'm sending a form by method post -- but I am still getting the route error "Unknown action - The action 'menu_add' could not be found for AdminController" -- how it is possible, if I'm not using route 'admin/menu_add' by get, but by post?
And one question yet - exist some effective way, how to work with routes? If i want to add some new action, I must to add to file 'routes.rb' line as:
get 'admin/menu_add' post 'admin/menu_add'
It's a bit boring to add every new action so manually... is some better way, how to do?
Thanks a lot, Manny.