diff options
author | Carl Lerche <carllerche@mac.com> | 2010-03-03 00:42:51 -0800 |
---|---|---|
committer | Carl Lerche <carllerche@mac.com> | 2010-03-03 00:43:05 -0800 |
commit | 9dae645c5f8a2aaa70b19e05daf9a7d270facb72 (patch) | |
tree | 6b5d7c8cf9cc201f33e2b3e25c328399999b81f6 /actionpack/lib/action_controller/metal/implicit_render.rb | |
parent | 6feffe5f38ad82d50b112ed102f8370ed934c8c1 (diff) | |
download | rails-9dae645c5f8a2aaa70b19e05daf9a7d270facb72.tar.gz rails-9dae645c5f8a2aaa70b19e05daf9a7d270facb72.tar.bz2 rails-9dae645c5f8a2aaa70b19e05daf9a7d270facb72.zip |
Actually move ImplicitRender into it's own file
Diffstat (limited to 'actionpack/lib/action_controller/metal/implicit_render.rb')
-rw-r--r-- | actionpack/lib/action_controller/metal/implicit_render.rb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/metal/implicit_render.rb b/actionpack/lib/action_controller/metal/implicit_render.rb new file mode 100644 index 0000000000..ba2d9b686e --- /dev/null +++ b/actionpack/lib/action_controller/metal/implicit_render.rb @@ -0,0 +1,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
\ No newline at end of file |