aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/admin/blog
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/admin/blog')
-rw-r--r--app/controllers/admin/blog/settings_controller.rb14
1 files changed, 11 insertions, 3 deletions
diff --git a/app/controllers/admin/blog/settings_controller.rb b/app/controllers/admin/blog/settings_controller.rb
index 962e8d1..52a7e83 100644
--- a/app/controllers/admin/blog/settings_controller.rb
+++ b/app/controllers/admin/blog/settings_controller.rb
@@ -1,12 +1,20 @@
class Admin::Blog::SettingsController < Admin::BaseController
- def update_notified
+ def notification_recipients
+ @recipients = BlogComment::Notification.recipients
+ if request.post?
+ BlogComment::Notification.recipients == params[:recipients]
+ end
end
def moderation
- BlogComment::Moderation.toggle
- redirect_back_or_default(admin_blog_posts_path)
+ enabled = BlogComment::Moderation.toggle
+ unless request.xhr?
+ redirect_back_or_default(admin_blog_posts_path)
+ else
+ render :json => {:enabled => enabled}
+ end
end
end