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