app/controllers/admin/gallery/photos_controller.rb in comfy_gallery-0.1.0 vs app/controllers/admin/gallery/photos_controller.rb in comfy_gallery-0.1.1

- old
+ new

@@ -22,16 +22,10 @@ file_params[:image].original_filename : file_params[:title] ) title = title + " #{i + 1}" if file_params[:title] == title && file_array.size > 1 - slug = (file_params[:slug].blank? && file_params[:image] ? - file_params[:image].original_filename.parameterize : - file_params[:slug] - ) - slug = (slug + "-#{i + 1}") if file_params[:slug] == slug && file_array.size > 1 - - @photo = Gallery::Photo.new({:gallery => @gallery}.merge(file_params.merge(:title => title, :slug => slug) || {})) + @photo = Gallery::Photo.new({:gallery => @gallery}.merge(file_params.merge(:title => title) || {})) @photo.save! end flash[:notice] = 'Photo created' redirect_to :action => :index