aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2006-11-02 19:21:53 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2006-11-02 19:21:53 +0000
commit99b607d7171c246273abd7045428e37ba23ce350 (patch)
tree67d9b790eb41e4a2a4dacd626da208f11e819f0c /actionpack
parent0ee5d64c34a69f002a0800dfc58e9c55645a4168 (diff)
downloadrails-99b607d7171c246273abd7045428e37ba23ce350.tar.gz
rails-99b607d7171c246273abd7045428e37ba23ce350.tar.bz2
rails-99b607d7171c246273abd7045428e37ba23ce350.zip
Consistent default handling in ActionView render. Closes #6534.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5411 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_view/base.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/actionpack/lib/action_view/base.rb b/actionpack/lib/action_view/base.rb
index e0bd591550..1342db058d 100644
--- a/actionpack/lib/action_view/base.rb
+++ b/actionpack/lib/action_view/base.rb
@@ -276,8 +276,7 @@ module ActionView #:nodoc:
elsif options == :update
update_page(&block)
elsif options.is_a?(Hash)
- options[:locals] ||= {}
- options[:use_full_path] = options[:use_full_path].nil? ? true : options[:use_full_path]
+ options = options.reverse_merge(:type => :rhtml, :locals => {}, :use_full_path => true)
if options[:file]
render_file(options[:file], options[:use_full_path], options[:locals])
@@ -286,7 +285,7 @@ module ActionView #:nodoc:
elsif options[:partial]
render_partial(options[:partial], ActionView::Base::ObjectWrapper.new(options[:object]), options[:locals])
elsif options[:inline]
- render_template(options[:type] || :rhtml, options[:inline], nil, options[:locals] || {})
+ render_template(options[:type], options[:inline], nil, options[:locals])
end
end
end