Skip to content

Instantly share code, notes, and snippets.

@leemour
Created January 15, 2019 18:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leemour/c4e3f0a3bc129b47ed23d0b688bd2c6c to your computer and use it in GitHub Desktop.
Save leemour/c4e3f0a3bc129b47ed23d0b688bd2c6c to your computer and use it in GitHub Desktop.
Spree Carrierwave replacement
# app/models/spree/image.rb
module Spree
class Image < Asset
mount_uploader :attachment, Spree::ImageUploader,
mount_on: :attachment_file_name
validates :attachment, presence: true
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment