diff options
author | José Valim <jose.valim@gmail.com> | 2011-05-06 18:39:10 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-05-06 18:44:18 +0200 |
commit | 9c2c25c1a1343937e96eed81e38ef4f9fb06ce11 (patch) | |
tree | 270fa93813a380761257e33a36f6069058b03e51 /actionpack/lib/action_controller | |
parent | 6acb858d06fa0873135eea0957a4aa5ea2fd0d2b (diff) | |
download | rails-9c2c25c1a1343937e96eed81e38ef4f9fb06ce11.tar.gz rails-9c2c25c1a1343937e96eed81e38ef4f9fb06ce11.tar.bz2 rails-9c2c25c1a1343937e96eed81e38ef4f9fb06ce11.zip |
Revert to old semantics, use available_action? instead of action_method?.
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r-- | actionpack/lib/action_controller/metal/implicit_render.rb | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/actionpack/lib/action_controller/metal/implicit_render.rb b/actionpack/lib/action_controller/metal/implicit_render.rb index 3ec0c4c6a4..e8e465d3ba 100644 --- a/actionpack/lib/action_controller/metal/implicit_render.rb +++ b/actionpack/lib/action_controller/metal/implicit_render.rb @@ -1,21 +1,19 @@ module ActionController module ImplicitRender def send_action(method, *args) - if respond_to?(method, true) - ret = super - default_render unless response_body - ret - else - default_render - end + ret = super + default_render unless response_body + ret end def default_render(*args) render(*args) end - def action_method?(action_name) - super || template_exists?(action_name.to_s, _prefixes) + def method_for_action(action_name) + super || if template_exists?(action_name.to_s, _prefixes) + "default_render" + end end end end |