Method: Mongoid::Threaded#set
- Defined in:
- lib/mongoid/threaded.rb
#set(key, value) ⇒ Object
Sets a variable in local storage with the given name to the given value. See #get for a discussion of why this method is necessary, and why Thread#[]= should be avoided in cascading callbacks on embedded children.
95 96 97 |
# File 'lib/mongoid/threaded.rb', line 95 def set(key, value) storage[key] = value end |