~ubuntu-branches/ubuntu/raring/ruby-actionpack-3.2/raring

« back to all changes in this revision

Viewing changes to lib/action_controller/metal/implicit_render.rb

  • Committer: Package Import Robot
  • Author(s): Ondřej Surý
  • Date: 2012-04-25 09:14:01 UTC
  • Revision ID: package-import@ubuntu.com-20120425091401-3nkf83btcemhjquo
Tags: upstream-3.2.3
Import upstream version 3.2.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
module ActionController
 
2
  module ImplicitRender
 
3
    def send_action(method, *args)
 
4
      ret = super
 
5
      default_render unless response_body
 
6
      ret
 
7
    end
 
8
 
 
9
    def default_render(*args)
 
10
      render(*args)
 
11
    end
 
12
 
 
13
    def method_for_action(action_name)
 
14
      super || if template_exists?(action_name.to_s, _prefixes)
 
15
        "default_render"
 
16
      end
 
17
    end
 
18
  end
 
19
end