clear_association_cache(#:nodoc:)
public
Clears out the association cache.
Show source
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