aboutsummaryrefslogblamecommitdiffstats
path: root/app/controllers/admin/blog/settings_controller.rb
blob: 52a7e836324452fa1ca389a8aa45d2cca77c3527 (plain) (tree)
1
2
3
4
5
6
7
8

                                                             
                             
                                                      
 


                                                                 


                





                                                     


     
class Admin::Blog::SettingsController < Admin::BaseController

  def notification_recipients
    @recipients = BlogComment::Notification.recipients

    if request.post?
      BlogComment::Notification.recipients == params[:recipients]
    end
  end

  def moderation
    enabled = BlogComment::Moderation.toggle
    unless request.xhr?
      redirect_back_or_default(admin_blog_posts_path)
    else
      render :json => {:enabled => enabled}
    end
  end

end