Module: Housekeeping::Users::ClassMethods
- Defined in:
- lib/housekeeping/users.rb
Instance Method Summary collapse
-
#all_creators ⇒ Scope
For all uniq Users that created this class.
-
#all_updaters ⇒ Scope
Scope for all uniq Users that updated this class (as currently recorded, does not include Papertrail).
Instance Method Details
#all_creators ⇒ Scope
Returns for all uniq Users that created this class.
40 41 42 |
# File 'lib/housekeeping/users.rb', line 40 def all_creators User.joins("created_#{self.name.demodulize.underscore.pluralize}".to_sym).uniq end |
#all_updaters ⇒ Scope
Returns scope for all uniq Users that updated this class (as currently recorded, does not include Papertrail).
46 47 48 |
# File 'lib/housekeeping/users.rb', line 46 def all_updaters User.joins("updated_#{self.name.demodulize.underscore.pluralize}".to_sym).uniq end |