app/controllers/admin/blog/settings_controller.rb in refinerycms-blog-1.1 vs app/controllers/admin/blog/settings_controller.rb in refinerycms-blog-1.2

- old
+ new

@@ -8,20 +8,32 @@ flash[:notice] = t('admin.blog.settings.notification_recipients.updated', :recipients => BlogComment::Notification.recipients) 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 def moderation enabled = BlogComment::Moderation.toggle! 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 end