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