Rails make all routes default to format: :json
Use constraints
constraints format: :json do
resources :users
end
or
resources :users, :defaults => { :format => 'json' }
Use constraints
constraints format: :json do
resources :users
end
or
resources :users, :defaults => { :format => 'json' }