Module ActionDispatch::Routing::Mapper::HttpHelpers
In: lib/action_dispatch/routing/mapper.rb

Methods

delete   get   post   put   redirect  

Public Instance methods

Define a route that only recognizes HTTP PUT. For supported arguments, see match.

Example:

delete ‘broccoli’, :to => ‘food#broccoli‘

Define a route that only recognizes HTTP GET. For supported arguments, see match.

Example:

get ‘bacon’, :to => ‘food#bacon‘

Define a route that only recognizes HTTP POST. For supported arguments, see match.

Example:

post ‘bacon’, :to => ‘food#bacon‘

Define a route that only recognizes HTTP PUT. For supported arguments, see match.

Example:

put ‘bacon’, :to => ‘food#bacon‘

Redirect any path to another path:

  match "/stories" => redirect("/posts")

[Validate]