Class: Audiences::Context
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Audiences::Context
- Includes:
- Locating, MembershipGroup
- Defined in:
- app/models/audiences/context.rb,
app/models/audiences/context/locating.rb
Overview
Represents a context where the group of users (audience) is relevant. It includes the current matching users and the criteria to match these users (#criteria, #match_all, #extra_users).
Defined Under Namespace
Modules: Locating
Constant Summary
Constants included from Locating
Instance Method Summary collapse
Methods included from Locating
Instance Method Details
#refresh_users! ⇒ Object
22 23 24 25 26 |
# File 'app/models/audiences/context.rb', line 22 def refresh_users! criteria.each(&:refresh_users!) update!(users: ContextUsers.new(self).to_a) Notifications.publish(self) end |