diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2008-06-05 23:27:27 +0100 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2008-06-05 23:33:10 +0100 |
commit | 1dbfe9766e00282c56523f6969550494bbffbbf4 (patch) | |
tree | b2946d0a07cc2ee4c6916db4e41fc24698d19ba1 /actionpack/lib/action_view/base.rb | |
parent | 2e0765a00361781fb9bff2a7ca8996eab1f01bd4 (diff) | |
download | rails-1dbfe9766e00282c56523f6969550494bbffbbf4.tar.gz rails-1dbfe9766e00282c56523f6969550494bbffbbf4.tar.bz2 rails-1dbfe9766e00282c56523f6969550494bbffbbf4.zip |
Ensure render :file works inside templates
Diffstat (limited to 'actionpack/lib/action_view/base.rb')
-rw-r--r-- | actionpack/lib/action_view/base.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/base.rb b/actionpack/lib/action_view/base.rb index f398756550..b2fcbfa554 100644 --- a/actionpack/lib/action_view/base.rb +++ b/actionpack/lib/action_view/base.rb @@ -253,6 +253,7 @@ If you are rendering a subtemplate, you must now use controller-like partial syn elsif options == :update update_page(&block) elsif options.is_a?(Hash) + use_full_path = options[:use_full_path] options = options.reverse_merge(:locals => {}, :use_full_path => true) if partial_layout = options.delete(:layout) @@ -266,7 +267,7 @@ If you are rendering a subtemplate, you must now use controller-like partial syn end end elsif options[:file] - render_file(options[:file], options[:use_full_path], options[:locals]) + render_file(options[:file], use_full_path || false, options[:locals]) elsif options[:partial] && options[:collection] render_partial_collection(options[:partial], options[:collection], options[:spacer_template], options[:locals]) elsif options[:partial] |