##// END OF EJS Templates
Don't hardcode news model in Comment....
Jean-Philippe Lang -
r11796:9ca8b20d5534
parent child
Show More
@@ -29,8 +29,9 class Comment < ActiveRecord::Base
29 private
29 private
30
30
31 def send_notification
31 def send_notification
32 if commented.is_a?(News) && Setting.notified_events.include?('news_comment_added')
32 mailer_method = "#{commented.class.name.underscore}_comment_added"
33 Mailer.news_comment_added(self).deliver
33 if Setting.notified_events.include?(mailer_method)
34 Mailer.send(mailer_method, self).deliver
34 end
35 end
35 end
36 end
36 end
37 end
General Comments 0
You need to be logged in to leave comments. Login now