Permalink
Browse files

BUGFIX: ensure @image_ids is not null even if not passed an empty par…

…ams array
  • Loading branch information...
robyurkowski committed Apr 3, 2012
1 parent 8fc65ec commit 24b40868cf0d291b22330d2ca8b9cef374301617
Showing with 1 addition and 0 deletions.
  1. +1 −0 app/models/refinery/portfolio/gallery.rb
@@ -33,6 +33,7 @@ def images=(ids = [])
def bulk_update_associated_items
+ @image_ids ||= []
existing_images = ::Refinery::Portfolio::Item.select('id').where(:gallery_id => id)
existing_ids = existing_images.collect(&:id)
@image_ids.each_with_index do |image_id, position|

0 comments on commit 24b4086

Please sign in to comment.