Class: UINotifications::Tasks::TaskPausedOwner
- Inherits:
-
Tasks::Base
- Object
- Tasks::Base
- UINotifications::Tasks::TaskPausedOwner
- Defined in:
- app/services/ui_notifications/tasks/task_paused_owner.rb
Instance Method Summary collapse
Instance Method Details
#blueprint ⇒ Object
21 22 23 |
# File 'app/services/ui_notifications/tasks/task_paused_owner.rb', line 21 def blueprint @blueprint ||= NotificationBlueprint.unscoped.find_by(:name => 'tasks_paused_owner') end |
#deliver! ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'app/services/ui_notifications/tasks/task_paused_owner.rb', line 4 def deliver! notification = ::Notification.new( :audience => Notification::AUDIENCE_USER, :notification_blueprint => blueprint, :initiator => initiator, :message => , :subject => subject ) notification.send(:set_custom_attributes) # to add links from blueprint notification.actions['links'] ||= [] if troubleshooting_help_generator notification.actions['links'].concat(troubleshooting_help_generator.links.map { |l| l.to_h(capitalize_title: true) }) end notification.save! notification end |
#message ⇒ Object
25 26 27 |
# File 'app/services/ui_notifications/tasks/task_paused_owner.rb', line 25 def StringParser.new(blueprint., subject: subject.action).to_s end |