Skip to content

Instantly share code, notes, and snippets.

@flyerhzm
flyerhzm / image.rb
Last active August 22, 2022 11:37 — forked from basgys/simple_paperclip.rb
paperclip without activerecord
class Image
extend ActiveModel::Naming
extend ActiveModel::Callbacks
include ActiveModel::Validations
include Paperclip::Glue
define_model_callbacks :save, only: [:after]
define_model_callbacks :destroy, only: [:before, :after]