aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/admin/blog/settings_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/admin/blog/settings_controller.rb')
-rw-r--r--app/controllers/admin/blog/settings_controller.rb16
1 files changed, 14 insertions, 2 deletions
diff --git a/app/controllers/admin/blog/settings_controller.rb b/app/controllers/admin/blog/settings_controller.rb
index cc9261b..a805d9c 100644
--- a/app/controllers/admin/blog/settings_controller.rb
+++ b/app/controllers/admin/blog/settings_controller.rb
@@ -10,7 +10,8 @@ class Admin::Blog::SettingsController < Admin::BaseController
unless request.xhr? or from_dialog?
redirect_back_or_default(admin_blog_posts_path)
else
- render :text => "<script type='text/javascript'>parent.window.location = '#{admin_blog_posts_path}';</script>"
+ render :text => "<script type='text/javascript'>parent.window.location = '#{admin_blog_posts_path}';</script>",
+ :layout => false
end
end
end
@@ -20,7 +21,18 @@ class Admin::Blog::SettingsController < Admin::BaseController
unless request.xhr?
redirect_back_or_default(admin_blog_posts_path)
else
- render :json => {:enabled => enabled}
+ render :json => {:enabled => enabled},
+ :layout => false
+ end
+ end
+
+ def comments
+ enabled = BlogComment.toggle!
+ unless request.xhr?
+ redirect_back_or_default(admin_blog_posts_path)
+ else
+ render :json => {:enabled => enabled},
+ :layout => false
end
end