Class: Logisticed::Logistic
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Logisticed::Logistic
- Defined in:
- lib/logisticed/logistic.rb
Class Method Summary collapse
Class Method Details
.as_user(user) ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/logisticed/logistic.rb', line 7 def self.as_user(user) last_logisticed_user = ::Logisticed.store[:logisticed_user] ::Logisticed.store[:logisticed_user] = user yield ensure ::Logisticed.store[:logisticed_user] = last_logisticed_user end |