module MR::FakeRecord::Associations::InstanceMethods
Public Instance Methods
association(name)
click to toggle source
ActiveRecord methods
# File lib/mr/fake_record/associations.rb, line 51 def association(name) @association_cache ||= {} @association_cache[name.to_sym] ||= begin reflection = self.class.reflections.find(name) reflection.association_class.new(self, reflection) end end