Commit 14699f4b6abc4b85b0f0b3c2cfdaf0125d2b222e
1 parent
87d27329
Exists in
master
and in
29 other branches
Extract Method
Showing
1 changed file
with
5 additions
and
1 deletions
Show diff stats
app/models/comment.rb
... | ... | @@ -100,12 +100,16 @@ class Comment < ActiveRecord::Base |
100 | 100 | include Noosfero::Plugin::HotSpot |
101 | 101 | |
102 | 102 | def verify_and_notify |
103 | - plugins.dispatch(:check_comment_for_spam, self) | |
103 | + check_for_spam | |
104 | 104 | unless spam? |
105 | 105 | notify_by_mail |
106 | 106 | end |
107 | 107 | end |
108 | 108 | |
109 | + def check_for_spam | |
110 | + plugins.dispatch(:check_comment_for_spam, self) | |
111 | + end | |
112 | + | |
109 | 113 | def notify_by_mail |
110 | 114 | if source.kind_of?(Article) && article.notify_comments? |
111 | 115 | if !article.profile.notification_emails.empty? | ... | ... |