topics notification

This commit is contained in:
Nicolas Bally 2014-11-22 14:10:34 +01:00
parent 4dc1709436
commit 8904573da1

View File

@ -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