Module: ApplicationActsAsConcern::ClassMethods

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

Instance Method Summary collapse

Instance Method Details

#acts_as(*args) ⇒ Object

Subclasses +acts_as+ to automatically inject the +inverse_of+ option.


7
8
9
10
11
12
13
# File 'app/models/concerns/application_acts_as_concern.rb', line 7

def acts_as(*args)
  options = args.extract_options!
  options.reverse_merge!(inverse_of: :actable)

  args.push(options)
  super(*args)
end