Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

patbl's Profile

GitHub User: patbl

Comments by

Avatar

match isn't deprecated in Rails 4; you just have to specify the HTTP method:

ruby
# Rails 3.2
match "/users/:id" => "users#show"

# Rails 4.0
match "/users/:id" => "users#show", via: :get
# or equivalently
get "/users/:id" => "users#show"

match is still useful for paths that respond to multiple HTTP methods.