aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/metal/implicit_render.rb
blob: ba2d9b686e034318a938e60174367eb6a25c5528 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
module ActionController
  module ImplicitRender
    def send_action(*)
      ret = super
      default_render unless response_body
      ret
    end

    def default_render
      render
    end

    def method_for_action(action_name)
      super || begin
        if view_paths.exists?(action_name.to_s, details_for_render, controller_path)
          "default_render"
        end
      end
    end
  end
end