From a6b6a0da3477719e0109ad6175b16f04d37b2550 Mon Sep 17 00:00:00 2001 From: Philip Arndt Date: Tue, 10 Aug 2010 16:17:03 +1200 Subject: Better settings, update notified has a form but doesn't yet work. Created script files but not using them yet. --- app/controllers/admin/blog/settings_controller.rb | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'app/controllers/admin') 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 -- cgit v1.2.3