render, , ActionController::Base.
def render(action = nil, options = {}, &blk)
options = _normalize_options(action, options, &blk)
super(options)
end
super, render, ActionController::Rendering.
def render(options)
super
self.content_type ||= options[:_template].mime_type.to_s
response_body
end
ActionController::Rendering , ActionController:: Base base.rb .
include ActionController::Redirecting
include ActionController::Rendering
include ActionController::Renderers::All
ActionController::Rendering AbstractController::Rendering, ActionController::Rendering.
module ActionController
module Rendering
extend ActiveSupport::Concern
included do
include AbstractController::Rendering
include AbstractController::LocalizedCache
end
AbstractController::Rendering render, , .
def render(*args)
if response_body
raise AbstractController::DoubleRenderError, "Can only render or redirect once per action"
end
self.response_body = render_to_body(*args)
end
AbstractController::Base
--> super()
--> ActionController::Rendering
--> super()
--> AbstractController::Rendering
--> render_to_body