Module: ActivityNotification::ActsAsGroup
- Extended by:
- ActiveSupport::Concern
- Included in:
- Models
- Defined in:
- lib/activity_notification/roles/acts_as_group.rb
Overview
Manages to add all required configurations to group models of notification.
Class Method Summary collapse
-
.acts_as_group(options = {}) ⇒ Hash
(also: acts_as_notification_group)
Adds required configurations to group models.
-
.available_group_options ⇒ Array<Symbol>
Returns array of available notification group options in acts_as_group.
Class Method Details
.acts_as_group(options = {}) ⇒ Hash Also known as: acts_as_notification_group
Adds required configurations to group models.
Parameters:
-
:printable_name or :printable_notification_group_name
-
Printable notification group name. This parameter is a optional since ‘ActivityNotification::Common.printable_name` is used as default value. :printable_name is the same option as :printable_notification_group_name
-
23 24 25 26 27 28 |
# File 'lib/activity_notification/roles/acts_as_group.rb', line 23 def acts_as_group( = {}) include Group [:printable_notification_group_name] ||= .delete(:printable_name) set_acts_as_parameters([:printable_notification_group_name], ) end |
.available_group_options ⇒ Array<Symbol>
Returns array of available notification group options in acts_as_group.
33 34 35 |
# File 'lib/activity_notification/roles/acts_as_group.rb', line 33 def [:printable_notification_group_name, :printable_name].freeze end |