Skip to content

Commit

Permalink
add: image.write(local_photo_path)
Browse files Browse the repository at this point in the history
  • Loading branch information
jywarren authored Feb 8, 2022
1 parent 37da66e commit 8bf0286
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/models/spectrum.rb
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ def rotate
photo.copy_to_local_file(:original,local_photo_path)
image = Magick::ImageList.new(local_photo_path)
image.rotate!(-90)
image.write('public' + photo.url)
image.write(local_photo_path)
photo.reprocess!
end

Expand All @@ -292,7 +292,7 @@ def reverse
photo.copy_to_local_file(:original,local_photo_path)
image = Magick::ImageList.new(local_photo_path)
image.flop!
image.write('public' + photo.url)
image.write(local_photo_path)
self.reversed = !reversed
photo.reprocess!
end
Expand Down Expand Up @@ -639,4 +639,4 @@ def local_photo_path
"/tmp/#{self.id}"
end

end
end

0 comments on commit 8bf0286

Please sign in to comment.