Displaying 1 result from an estimated 1 matches for "rendered_format".
2012 Sep 18
4
multiple modules defining same method included into a class
...mesapce that Base is defined in???
Well, ActionController module does define a module named Rendering:
module ActionController
module Rendering
def render(*args)
raise ::AbstractController::DoubleRenderError if response_body
super
self.content_type ||= Mime[lookup_context.rendered_format].to_s
response_body
end
So now the method render(*args) is included in the Base class as an
instance method. So when we call, for example, (hypothetically)
ActionView::Base.new.render :action => "my_action", :layout => false,
ActionView::Base is instantiated and we invok...