diff options
Diffstat (limited to 'app/models/blog_comment.rb')
-rw-r--r-- | app/models/blog_comment.rb | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/app/models/blog_comment.rb b/app/models/blog_comment.rb index aced256..04651fe 100644 --- a/app/models/blog_comment.rb +++ b/app/models/blog_comment.rb @@ -17,10 +17,24 @@ class BlogComment < ActiveRecord::Base end def toggle - currently = self.enabled? - RefinerySetting[:comment_moderation] = !currently + RefinerySetting[:comment_moderation] = !(currently = self.enabled?) end end end -end + module Notification + class << self + def recipients + RefinerySetting.find_or_set(:comment_notification_recipients, { + :value => (Role[:refinery].users.first.email rescue ''), + :scoping => :blog + }) + end + + def recipients=(emails) + RefinerySetting[:comment_notification_recipients] = emails + end + end + end + +end
\ No newline at end of file |