Module: Mongoid::Relations::Accessors
- Defined in:
- lib/locomotive/mongoid/patches.rb
Instance Method Summary collapse
Instance Method Details
#reset_relation_criteria(name) ⇒ Object
48 49 50 51 52 |
# File 'lib/locomotive/mongoid/patches.rb', line 48 def reset_relation_criteria(name) if instance_variable_defined?("@_#{name}_ivar") send(name).reset_unloaded end end |
#set_relation(name, relation) ⇒ Object
53 54 55 |
# File 'lib/locomotive/mongoid/patches.rb', line 53 def set_relation(name, relation) instance_variable_set("@_#{name}_ivar", relation) end |