Module: BigRecord::ArAssociations

Defined in:
lib/big_record/ar_associations.rb,
lib/big_record/ar_associations/association_proxy.rb,
lib/big_record/ar_associations/has_one_association.rb,
lib/big_record/ar_associations/has_many_association.rb,
lib/big_record/ar_associations/association_collection.rb,
lib/big_record/ar_associations/belongs_to_association.rb,
lib/big_record/ar_associations/belongs_to_many_association.rb,
lib/big_record/ar_associations/has_and_belongs_to_many_association.rb

Overview

:nodoc:

Defined Under Namespace

Modules: ClassMethods Classes: AssociationCollection, AssociationProxy, BelongsToAssociation, BelongsToManyAssociation, HasAndBelongsToManyAssociation, HasManyAssociation, HasOneAssociation

Class Method Summary

Instance Method Summary

Class Method Details

+ (Object) included(base)



65
66
67
# File 'lib/big_record/ar_associations.rb', line 65

def self.included(base)
  base.extend(ClassMethods)
end

Instance Method Details

- (Object) clear_association_cache

Clears out the association cache



70
71
72
73
74
# File 'lib/big_record/ar_associations.rb', line 70

def clear_association_cache 
  self.class.reflect_on_all_associations.to_a.each do |assoc|
    instance_variable_set "@#{assoc.name}", nil
  end unless self.new_record?
end