Module: ActionController::Rendering
- Extended by:
- ActiveSupport::Concern
- Includes:
- AbstractController::Rendering, RackDelegation
- Defined in:
- actionpack/lib/action_controller/metal/rendering.rb
Instance Attribute Summary
Attributes included from AbstractController::Rendering
Instance Method Summary (collapse)
-
- (Object) process_action
Before processing, set the request formats in current controller formats.
-
- (Object) render(*args)
Check for double render errors and set the content_type after rendering.
Methods included from ActiveSupport::Concern
append_features, extended, included
Methods included from AbstractController::Rendering
#_prefix, #_render_template, #initialize, #process, #render_to_body, #render_to_string, #view_context
Methods included from AbstractController::ViewPaths
#append_view_path, #details_for_lookup, #lookup_context, #prepend_view_path
Methods included from RackDelegation
#dispatch, #reset_session, #response_body=
Instance Method Details
- (Object) process_action
Before processing, set the request formats in current controller formats.
9 10 11 12 |
# File 'actionpack/lib/action_controller/metal/rendering.rb', line 9 def process_action(*) #:nodoc: self.formats = request.formats.map { |x| x.to_sym } super end |
- (Object) render(*args)
Check for double render errors and set the content_type after rendering.
15 16 17 18 19 20 |
# File 'actionpack/lib/action_controller/metal/rendering.rb', line 15 def render(*args) #:nodoc: raise ::AbstractController::DoubleRenderError if response_body super self.content_type ||= Mime[formats.first].to_s response_body end |