diff options
author | Ryan Bates <ryan@railscasts.com> | 2008-08-22 08:04:27 -0700 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2008-08-22 18:15:53 +0100 |
commit | 9a5ffaa01e5a13d9ec2209a1a937d46fc12615a1 (patch) | |
tree | 79c0e40f315ce708e0ff75b4455557cfb0ce44ee /actionpack/lib/action_view/partials.rb | |
parent | 4e4277b9e0a77c62dd1e253156bcde9e4a1a16b2 (diff) | |
download | rails-9a5ffaa01e5a13d9ec2209a1a937d46fc12615a1.tar.gz rails-9a5ffaa01e5a13d9ec2209a1a937d46fc12615a1.tar.bz2 rails-9a5ffaa01e5a13d9ec2209a1a937d46fc12615a1.zip |
Ensure :partial => @collection and :collection => @collection behaves same. [#884 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
Diffstat (limited to 'actionpack/lib/action_view/partials.rb')
-rw-r--r-- | actionpack/lib/action_view/partials.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/partials.rb b/actionpack/lib/action_view/partials.rb index a91417293a..4d19d992df 100644 --- a/actionpack/lib/action_view/partials.rb +++ b/actionpack/lib/action_view/partials.rb @@ -156,7 +156,7 @@ module ActionView local_assigns.merge!(builder_partial_path.to_sym => partial_path) render_partial(:partial => builder_partial_path, :object => options[:object], :locals => local_assigns) when Array, ActiveRecord::Associations::AssociationCollection, ActiveRecord::NamedScope::Scope - partial_path.any? ? render_partial(:collection => partial_path, :locals => local_assigns) : "" + render_partial_collection(options.except(:partial).merge(:collection => partial_path)) else object = partial_path render_partial( |