I want to respond with json to all formats.
I can force the render format to json
so the action will render show.json
despite the accept
header:
def show
render formats: :json
end
How I can set render format for all actions of the controller?
Something like this:
class GalleriesController < ApplicationController
formats :json
end