Ruby on Rails Routes - difference between get and match
Ruby on-RailsRuby on-Rails-3Ruby on-Rails Problem Overview
What would the difference be?
Example Match:
match 'photos/show' => 'photos#show'
Example Get:
get 'photos/show'
Wouldn't both make it possible to reach the photos/show URL and also use the show action in the photos controller?
Thanks
Ruby on-Rails Solutions
Solution 1 - Ruby on-Rails
match
matches any http method/verb, while get
matches only http method/verb GET.
Following two are equivalent:
match "/signup" => "users#new", :via => [:get]
get "/signup" => "users#new"