Sorry if this is a really basic question but I can't seem to add my own
action that works through a post method. I've tried :new, :create,
:collection, :member, etc without any success it seems to automatically
take you to create or show as soon as it senses a post (get mappings
work just fine!)
With conditions you can define restrictions on routes. Currently the only
valid condition is :method.
:method - Allows you to specify which method can access the route.
Possible values are :post, :get, :put,
:delete and :any. The default value is :any,
:any means that any method can access the route.
Example:
map.resources :messages, :collection => { :rss => :get }
# --> GET /messages/rss (maps to the #rss action)
# also adds a named route called "rss_messages"
map.resources :messages, :member => { :mark => :post }
# --> POST /messages/1/mark (maps to the #mark action)
# also adds a named route called "mark_message"