Module: ActivityNotification::Group

Extended by:
ActiveSupport::Concern
Includes:
Common
Defined in:
lib/activity_notification/models/concerns/group.rb

Overview

Notification group implementation included in group model to bundle notification.

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Common

#printable_name, #printable_type, #resolve_value, #to_class_name, #to_resource_name, #to_resources_name

Class Method Details

.available_as_group?Boolean

Checks if the model includes notification group methods are available.

Returns:

  • (Boolean)

    Always true



14
15
16
# File 'lib/activity_notification/models/concerns/group.rb', line 14

def available_as_group?
  true
end

.set_group_class_defaultsNilClass

Sets default values to group class fields.

Returns:

  • (NilClass)

    nil



20
21
22
23
# File 'lib/activity_notification/models/concerns/group.rb', line 20

def set_group_class_defaults
  self._printable_notification_group_name = :printable_name
  nil
end

Instance Method Details

#printable_group_nameString

Returns printable group model name to show in view or email.

Returns:

  • (String)

    Printable group model name



28
29
30
# File 'lib/activity_notification/models/concerns/group.rb', line 28

def printable_group_name
  resolve_value(_printable_notification_group_name)
end