Sha256: 679d09c1cd603e4db615f3274cdc7125889b07dd5483840714cb4f67dba4c6a4
Contents?: true
Size: 956 Bytes
Versions: 92
Compression:
Stored size: 956 Bytes
Contents
module UINotifications module Tasks class TaskPausedOwner < Tasks::Base def deliver! notification = ::Notification.new( :audience => Notification::AUDIENCE_USER, :notification_blueprint => blueprint, :initiator => initiator, :message => 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 def blueprint @blueprint ||= NotificationBlueprint.unscoped.find_by(:name => 'tasks_paused_owner') end def message StringParser.new(blueprint.message, subject: subject.action).to_s end end end end
Version data entries
92 entries across 92 versions & 1 rubygems