diff options
author | José Valim <jose.valim@gmail.com> | 2009-10-18 22:52:36 -0200 |
---|---|---|
committer | Yehuda Katz <wycats@gmail.com> | 2009-11-01 02:23:48 +0100 |
commit | 43d5504f0a6a831474d149aa5f1ebb2545790152 (patch) | |
tree | ab3c28e28279c029784b5c3e129d0e3c0d8faa75 /actionpack/lib/abstract_controller/layouts.rb | |
parent | 684c2dc20801b7fcc941ec9478d33d3bf7c74551 (diff) | |
download | rails-43d5504f0a6a831474d149aa5f1ebb2545790152.tar.gz rails-43d5504f0a6a831474d149aa5f1ebb2545790152.tar.bz2 rails-43d5504f0a6a831474d149aa5f1ebb2545790152.zip |
Move all render and layout pieces required in ActionMailer from ActionController to AbstractController.
Diffstat (limited to 'actionpack/lib/abstract_controller/layouts.rb')
-rw-r--r-- | actionpack/lib/abstract_controller/layouts.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/actionpack/lib/abstract_controller/layouts.rb b/actionpack/lib/abstract_controller/layouts.rb index 4723e18a01..f4f1d41360 100644 --- a/actionpack/lib/abstract_controller/layouts.rb +++ b/actionpack/lib/abstract_controller/layouts.rb @@ -157,6 +157,7 @@ module AbstractController end private + # This will be overwritten by _write_layout_method def _layout(details) end @@ -191,6 +192,14 @@ module AbstractController end end + def _determine_template(options) + super + + return if (options.key?(:text) || options.key?(:inline) || options.key?(:partial)) && !options.key?(:layout) + layout = options.key?(:layout) ? options[:layout] : :default + options[:_layout] = _layout_for_option(layout, options[:_template].details) + end + # Take in the name and details and find a Template. # # ==== Parameters |