@@ -29,8 +29,9 class Comment < ActiveRecord::Base | |||
|
29 | 29 | private |
|
30 | 30 | |
|
31 | 31 | def send_notification |
|
32 | if commented.is_a?(News) && Setting.notified_events.include?('news_comment_added') | |
|
33 | Mailer.news_comment_added(self).deliver | |
|
32 | mailer_method = "#{commented.class.name.underscore}_comment_added" | |
|
33 | if Setting.notified_events.include?(mailer_method) | |
|
34 | Mailer.send(mailer_method, self).deliver | |
|
34 | 35 | end |
|
35 | 36 | end |
|
36 | 37 | end |
General Comments 0
You need to be logged in to leave comments.
Login now