Module: ActsAsHocAvatarable::ClassMethods

Defined in:
lib/acts_as_hoc_avatarable/acts_as_hoc_avatarable.rb

Instance Method Summary collapse

Instance Method Details

#acts_as_hoc_avatarable(_options = {}) ⇒ Object



7
8
9
10
11
12
13
14
15
# File 'lib/acts_as_hoc_avatarable/acts_as_hoc_avatarable.rb', line 7

def acts_as_hoc_avatarable(_options = {})
  require 'digest/md5'
  has_one_attached :avatar
  attr_accessor :avatar_contents
  attr_accessor :avatar_name
  attr_accessor :remove_avatar
  before_save :clear_avatar
  after_save :parse_avatar
end