Module | Ddb::Userstamp::Stamper::InstanceMethods |
In: |
lib/stamper.rb
|
Used to set the stamper for a particular request. See the Userstamp module for more details on how to use this method.
# File lib/stamper.rb, line 19 19: def stamper=(object) 20: object_stamper = if object.is_a?(ActiveRecord::Base) 21: object.send("#{object.class.primary_key}".to_sym) 22: else 23: object 24: end 25: 26: Thread.current["#{self.to_s.downcase}_#{self.object_id}_stamper"] = object_stamper 27: end