Module: HasManyPurgable::Base

Defined in:
app/models/concerns/has_many_purgable.rb

Instance Method Summary collapse

Instance Method Details

#has_many_purgable(*args) ⇒ Object



17
18
19
20
21
22
23
24
# File 'app/models/concerns/has_many_purgable.rb', line 17

def has_many_purgable(*args)
  options = args.extract_options!
  names = Array(args).compact.presence || :all

  @has_many_purgable_options = options.merge(names: names)

  include ::HasManyPurgable
end

#has_one_purgable(*args) ⇒ Object



26
27
28
# File 'app/models/concerns/has_many_purgable.rb', line 26

def has_one_purgable(*args)
  has_many_purgable(*args)
end