Module: Housekeeping::Users::ClassMethods

Defined in:
lib/housekeeping/users.rb

Instance Method Summary (collapse)

Instance Method Details

- (Scope) all_creators

Returns for all uniq Users that created this class

Returns:

  • (Scope)

    for all uniq Users that created this class



35
36
37
# File 'lib/housekeeping/users.rb', line 35

def all_creators
  User.joins("created_#{self.name.demodulize.underscore.pluralize}".to_sym).uniq
end

- (Scope) all_updaters

Returns scope for all uniq Users that updated this class (as currently recorded, does not include Papertrail)

Returns:

  • (Scope)

    scope for all uniq Users that updated this class (as currently recorded, does not include Papertrail)



41
42
43
# File 'lib/housekeeping/users.rb', line 41

def all_updaters
  User.joins("updated_#{self.name.demodulize.underscore.pluralize}".to_sym).uniq
end