Module: ActionController::ImplicitRender

Defined in:
lib/action_controller/metal/implicit_render.rb

Instance Method Summary collapse

Instance Method Details

#default_renderObject



13
14
15
# File 'lib/action_controller/metal/implicit_render.rb', line 13

def default_render
  render
end

#method_for_action(action_name) ⇒ Object



17
18
19
20
21
# File 'lib/action_controller/metal/implicit_render.rb', line 17

def method_for_action(action_name)
  super || if template_exists?(action_name.to_s, _prefix)
    action_name.to_s
  end
end

#send_action(method, *args) ⇒ Object



3
4
5
6
7
8
9
10
11
# File 'lib/action_controller/metal/implicit_render.rb', line 3

def send_action(method, *args)
  if respond_to?(method, true)
    ret = super
    default_render unless response_body
    ret
  else
    default_render
  end
end