Reputation: 23747
I have a route as:
match 'api/v1/:id/:format/:date/(:type)', :controller => "xpto", :action => "api_xpto"
The goal is to make it as a GET request from the outside. However, the route is not being set as a GET.
How can I make it a GET?
Upvotes: 1
Views: 166
Reputation: 1039
Change match to get:
get 'api/v1/:id/:format/:date/(:type)', :controller => "xpto", :action => "api_xpto"
Or add :via option
match 'api/v1/:id/:format/:date/(:type)', :controller => "xpto", :action => "api_xpto", :via => :get
Upvotes: 1