Skip to content

Commit

Permalink
Merge 923184c into 0bdebdf
Browse files Browse the repository at this point in the history
  • Loading branch information
bricesanchez committed Aug 14, 2018
2 parents 0bdebdf + 923184c commit 032f66d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions images/app/controllers/refinery/admin/images_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,10 @@ def create
begin
if params[:image].present? && params[:image][:image].is_a?(Array)
params[:image][:image].each do |image|
params[:image][:image_title] = params[:image][:image_title].presence || auto_title(image.original_filename)
@images << (@image = ::Refinery::Image.create({image: image}.merge(image_params.except(:image).to_h)))
image_title = params[:image][:image_title].presence || auto_title(image.original_filename)
@images << @image = ::Refinery::Image.create(
image_params.merge(image_title: image_title, image: image)
)
end
else
@images << (@image = ::Refinery::Image.create(image_params))
Expand Down

0 comments on commit 032f66d

Please sign in to comment.