Module: ActivityNotification::Notifier
- Extended by:
- ActiveSupport::Concern
- Includes:
- Common
- Defined in:
- lib/activity_notification/models/concerns/notifier.rb
Overview
Notifier implementation included in notifier model to be notified, like users or administrators.
Class Method Summary collapse
-
.available_as_notifier? ⇒ Boolean
Checks if the model includes notifier methods are available.
-
.set_notifier_class_defaults ⇒ NilClass
Sets default values to notifier class fields.
Instance Method Summary collapse
-
#printable_notifier_name ⇒ String
Returns printable notifier model name to show in view or email.
Methods included from Common
#printable_name, #printable_type, #resolve_value, #to_class_name, #to_resource_name, #to_resources_name
Class Method Details
.available_as_notifier? ⇒ Boolean
Checks if the model includes notifier methods are available.
17 18 19 |
# File 'lib/activity_notification/models/concerns/notifier.rb', line 17 def available_as_notifier? true end |
.set_notifier_class_defaults ⇒ NilClass
Sets default values to notifier class fields.
23 24 25 26 |
# File 'lib/activity_notification/models/concerns/notifier.rb', line 23 def set_notifier_class_defaults self._printable_notifier_name = :printable_name nil end |
Instance Method Details
#printable_notifier_name ⇒ String
Returns printable notifier model name to show in view or email.
31 32 33 |
# File 'lib/activity_notification/models/concerns/notifier.rb', line 31 def printable_notifier_name resolve_value(_printable_notifier_name) end |