2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
# File 'lib/messageCreator.rb', line 2
def self.create(recipientUsername, actorUsername, value, url)
if value == 1
message = "Hi #{recipientUsername}, You have a notification.... #{actorUsername} has liked your post. Please click on the url to view the post #{url}."
return message
elsif value == 2
message = "Hi #{recipientUsername}, You have a notification.... #{actorUsername} has commented on your post. Please click on the url to view the post #{url}."
return message
elsif value == 3
message = "Hi #{recipientUsername}, You have a notification.... #{actorUsername} has added you to his circle. Please click on the url to view his profile #{url}."
return message
else
message = "nil"
return message
end
end
|