Class: ReviewNotification

Inherits:
NotificationDecorator show all
Defined in:
lib/bat_notifications.rb

Overview

Cconfigure notification to send email to user and user_reviewed when action is review

Instance Method Summary collapse

Methods inherited from NotificationDecorator

#async_email, #get_action, #get_content, #get_receiver, #get_receiver_full_name, #get_sender, #get_sender_full_name, #send_email, #send_notification_to_receiver, #send_notification_to_sender

Constructor Details

#initialize(notification) ⇒ ReviewNotification



195
196
197
198
199
# File 'lib/bat_notifications.rb', line 195

def initialize(notification)
    super(notification)
    @action = "Review"
    @subject = "New #{@action} "
end

Instance Method Details

#get_subjectObject



207
208
209
# File 'lib/bat_notifications.rb', line 207

def get_subject
    return @subject
end

#messageObject



201
202
203
204
205
# File 'lib/bat_notifications.rb', line 201

def message
    return "<h1>You have a new #{get_action}. Check out the details below</h1>
    <p>Review From: #{get_sender_full_name}</p>
    #{ReviewFunctions.get_review_message(get_content)}"
end