diff options
author | Gonçalo Silva <goncalossilva@gmail.com> | 2011-03-30 03:24:20 +0100 |
---|---|---|
committer | Gonçalo Silva <goncalossilva@gmail.com> | 2011-03-30 03:24:20 +0100 |
commit | b8f9a4515682f2722dc6e8ff9c106f5f774e703b (patch) | |
tree | 4c8f2cdc516374b1856963d57dfdaeb212bb2153 /actionpack/lib/action_controller/metal/implicit_render.rb | |
parent | 6212749bd48d84e79b728b128bc8a0eabb572106 (diff) | |
parent | 58becf116580c37c63b89f4a660ebe293f6e7c4e (diff) | |
download | rails-b8f9a4515682f2722dc6e8ff9c106f5f774e703b.tar.gz rails-b8f9a4515682f2722dc6e8ff9c106f5f774e703b.tar.bz2 rails-b8f9a4515682f2722dc6e8ff9c106f5f774e703b.zip |
Merge branch 'master' of https://github.com/rails/rails into performance_test
Diffstat (limited to 'actionpack/lib/action_controller/metal/implicit_render.rb')
-rw-r--r-- | actionpack/lib/action_controller/metal/implicit_render.rb | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/actionpack/lib/action_controller/metal/implicit_render.rb b/actionpack/lib/action_controller/metal/implicit_render.rb index cfa7004048..4b301c0d90 100644 --- a/actionpack/lib/action_controller/metal/implicit_render.rb +++ b/actionpack/lib/action_controller/metal/implicit_render.rb @@ -1,9 +1,13 @@ module ActionController module ImplicitRender - def send_action(*) - ret = super - default_render unless response_body - ret + def send_action(method, *args) + if respond_to?(method, true) + ret = super + default_render unless response_body + ret + else + default_render + end end def default_render @@ -11,10 +15,8 @@ module ActionController end def method_for_action(action_name) - super || begin - if template_exists?(action_name.to_s, _prefixes) - "default_render" - end + super || if template_exists?(action_name.to_s, _prefixes) + action_name.to_s end end end |