module Sequel::Plugins::AssociationAutoreloading::ClassMethods

Attributes

autoreloading_associations[R]

Hash with column symbol keys and arrays of many_to_one association symbols that should be cleared when the column value changes.

Private Instance Methods

def_many_to_one(opts) click to toggle source

Add the association to the array of associations to clear for each of the foreign key columns.

Calls superclass method
# File lib/sequel/plugins/association_autoreloading.rb, line 31
def def_many_to_one(opts)
  super
  opts[:keys].each do |key|
    (@autoreloading_associations[key] ||= []) << opts[:name]
  end
end