Method: Mongoid::Relations::Accessors#set_relation
- Defined in:
- lib/mongoid/relations/accessors.rb
#set_relation(name, relation) ⇒ Proxy
Set the supplied relation to an instance variable on the class with the provided name. Used as a helper just for code cleanliness.
74 75 76 |
# File 'lib/mongoid/relations/accessors.rb', line 74 def set_relation(name, relation) instance_variable_set("@_#{name}", relation) end |