topics notification
This commit is contained in:
parent
4dc1709436
commit
8904573da1
@ -12,7 +12,9 @@ class ForumMessage < ActiveRecord::Base
|
|||||||
|
|
||||||
|
|
||||||
after_create do
|
after_create do
|
||||||
topic = ForumTopic.find(self.forum_topic_id)
|
topic = self.topic
|
||||||
|
if topic.forum_messages.count > 1
|
||||||
|
|
||||||
|
|
||||||
user_to_notify = []
|
user_to_notify = []
|
||||||
|
|
||||||
@ -37,7 +39,7 @@ class ForumMessage < ActiveRecord::Base
|
|||||||
user_to_notify.each do |forum_user|
|
user_to_notify.each do |forum_user|
|
||||||
ForumMails.message_notification(self, forum_user).deliver
|
ForumMails.message_notification(self, forum_user).deliver
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user