I asked this question earlier today about wrapping all routes into default json format. I could have sworn it was working earlier but I may have been mistaken.
How come this works:
resources :insurances, only: [:index, :show], :defaults => { :format => 'json' }
but this does not:
constraints format: :json do
resources :insurances, only: [:index, :show]
end
Am I missing something basic on how constraints work?