diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/models/blog_comment.rb | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/app/models/blog_comment.rb b/app/models/blog_comment.rb index 37e11ac..28139e7 100644 --- a/app/models/blog_comment.rb +++ b/app/models/blog_comment.rb @@ -11,11 +11,16 @@ class BlogComment < ActiveRecord::Base module Moderation class << self def enabled? - RefinerySetting.find_or_set(:comment_moderation, true, {:scoping => :blog}) + RefinerySetting.find_or_set(:comment_moderation, true, { + :scoping => :blog + }) end def toggle - RefinerySetting[:comment_moderation] = {:value => !self.enabled?, :scoping => :blog} + RefinerySetting[:comment_moderation] = { + :value => !self.enabled?, + :scoping => :blog + } end end end @@ -24,12 +29,17 @@ class BlogComment < ActiveRecord::Base class << self def recipients RefinerySetting.find_or_set( - :comment_notification_recipients, (Role[:refinery].users.first.email rescue ''), {:scoping => :blog} + :comment_notification_recipients, + (Role[:refinery].users.first.email rescue ''), + {:scoping => :blog} ) end def recipients=(emails) - RefinerySetting[:comment_notification_recipients] = {:value => emails, :scoping => :blog} + RefinerySetting[:comment_notification_recipients] = { + :value => emails, + :scoping => :blog + } end end end |