diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/admin/blog/settings_controller.rb | 2 | ||||
-rw-r--r-- | app/models/blog_comment.rb | 12 |
2 files changed, 5 insertions, 9 deletions
diff --git a/app/controllers/admin/blog/settings_controller.rb b/app/controllers/admin/blog/settings_controller.rb index 9648688..52a7e83 100644 --- a/app/controllers/admin/blog/settings_controller.rb +++ b/app/controllers/admin/blog/settings_controller.rb @@ -1,7 +1,7 @@ class Admin::Blog::SettingsController < Admin::BaseController def notification_recipients - @recipients = BlogComment::Notification.recipients['value'] + @recipients = BlogComment::Notification.recipients if request.post? BlogComment::Notification.recipients == params[:recipients] diff --git a/app/models/blog_comment.rb b/app/models/blog_comment.rb index 04651fe..5718295 100644 --- a/app/models/blog_comment.rb +++ b/app/models/blog_comment.rb @@ -10,10 +10,7 @@ class BlogComment < ActiveRecord::Base module Moderation class << self def enabled? - RefinerySetting.find_or_set(:comment_moderation, { - :value => true, - :scoping => :blog - }) + RefinerySetting.find_or_set(:comment_moderation, true, {:scoping => :blog}) end def toggle @@ -25,10 +22,9 @@ class BlogComment < ActiveRecord::Base module Notification class << self def recipients - RefinerySetting.find_or_set(:comment_notification_recipients, { - :value => (Role[:refinery].users.first.email rescue ''), - :scoping => :blog - }) + RefinerySetting.find_or_set( + :comment_notification_recipients, (Role[:refinery].users.first.email rescue ''), {:scoping => :blog} + ) end def recipients=(emails) |