Can you make all routes default to json
?
I have the following for an api scope but am wondering if you can do the same for the global scope?
scope :api, defaults: {format: :json} do
get "/search(/:query)(/:location)" => "search#index"
end
For example all user
resources would also default to json
resources :users