diff options
author | José Valim <jose.valim@gmail.com> | 2009-12-31 01:45:56 +0100 |
---|---|---|
committer | Yehuda Katz <wycats@Yehuda-Katz.local> | 2009-12-31 18:40:20 -0800 |
commit | c03c40b481f433214ff68d1cae93df9e26190b42 (patch) | |
tree | 8d5b8ee06fbf1426aef436d3533132eaa6773c53 /actionpack/lib/action_controller | |
parent | 33c98b15bc8bea1366a721eae5fbfecf6c53c65d (diff) | |
download | rails-c03c40b481f433214ff68d1cae93df9e26190b42.tar.gz rails-c03c40b481f433214ff68d1cae93df9e26190b42.tar.bz2 rails-c03c40b481f433214ff68d1cae93df9e26190b42.zip |
Expose a _render_partial hook as thhe _render_template one and make use of it.
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r-- | actionpack/lib/action_controller/metal/rendering.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/actionpack/lib/action_controller/metal/rendering.rb b/actionpack/lib/action_controller/metal/rendering.rb index 20eb524e50..74e50bb032 100644 --- a/actionpack/lib/action_controller/metal/rendering.rb +++ b/actionpack/lib/action_controller/metal/rendering.rb @@ -20,12 +20,6 @@ module ActionController def render_to_body(options) _process_options(options) - - if options.key?(:partial) - options[:partial] = action_name if options[:partial] == true - options[:_details] = {:formats => formats} - end - super end @@ -43,6 +37,12 @@ module ActionController super end + def _render_partial(options) + options[:partial] = action_name if options[:partial] == true + options[:_details] = {:formats => formats} + super + end + def format_for_text formats.first end |