Module: ActionController::Rendering
- Defined in:
- lib/render.rb
Instance Method Summary collapse
- #controller_options(*args) ⇒ Object
- #render(*args) ⇒ Object
- #render_controller(controller_class, options = {:action => :index}) ⇒ Object
- #render_orig ⇒ Object
Instance Method Details
#controller_options(*args) ⇒ Object
10 11 12 13 14 |
# File 'lib/render.rb', line 10 def (*args) = args.first return if .is_a?(Hash) && [:controller] nil end |
#render(*args) ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'lib/render.rb', line 16 def render(*args) if = (*args) controller = .delete(:controller) render_controller(controller, ) else render_orig(*args) end end |
#render_controller(controller_class, options = {:action => :index}) ⇒ Object
5 6 7 8 |
# File 'lib/render.rb', line 5 def render_controller(controller_class, = {:action => :index}) status, headers, resp = controller_class.action([:action]).call(request.env) render_orig :text => resp.body, :status => status end |
#render_orig ⇒ Object
4 |
# File 'lib/render.rb', line 4 alias_method :render_orig, :render |