module ActionController::Rendering

def process_action(*) # :nodoc:

:nodoc:
Before processing, set the request formats in current controller formats.
def process_action(*) # :nodoc:
  self.formats = request.formats.filter_map(&:ref)
  super
end