diff options
author | Philip Arndt <parndt@gmail.com> | 2010-08-11 10:02:08 +1200 |
---|---|---|
committer | Philip Arndt <parndt@gmail.com> | 2010-08-11 10:02:08 +1200 |
commit | 0f4fc2d1cee094c697f40cbd2d3cca4f88717cd5 (patch) | |
tree | 5623c8137428a2ee74ab7104cdee928c2dbe135f /app | |
parent | a0a088bcb7033bd3b3c0bee406fb79b722852269 (diff) | |
download | refinerycms-blog-0f4fc2d1cee094c697f40cbd2d3cca4f88717cd5.tar.gz refinerycms-blog-0f4fc2d1cee094c697f40cbd2d3cca4f88717cd5.tar.bz2 refinerycms-blog-0f4fc2d1cee094c697f40cbd2d3cca4f88717cd5.zip |
Helps when you use the RefinerySetting library properly. This is even sadder when you wrote most of it and then forgot.
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) |