Exception: AdequateSerialization::CacheBusting::InverseNotFoundError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/adequate_serialization/rails/cache_busting.rb

Instance Method Summary collapse

Constructor Details

#initialize(record, association) ⇒ InverseNotFoundError

Returns a new instance of InverseNotFoundError.



6
7
8
9
10
11
12
13
14
# File 'lib/adequate_serialization/rails/cache_busting.rb', line 6

def initialize(record, association)
  super(<<~MSG)
    In order to be able to bust the associated cache for #{record}'s
    `#{association}` association, that association must have an inverse.
    Currently it doesn't, which means Rails was unable to determine the
    name of the inverse association. You can fix this by adding the
    inverse_of option to the association declaration.
  MSG
end