Method: Admin::Blog::SettingsController#comments

Defined in:
app/controllers/admin/blog/settings_controller.rb

#commentsObject

Checking for the blog is commentable or not then do commentable or uncommentable



23
24
25
26
27
28
29
30
31
32
33
# File 'app/controllers/admin/blog/settings_controller.rb', line 23

def comments
  value = BlogPost::CommentSetting.is_comments_allowed?
  
  if value      
    BlogPost::CommentSetting.do_uncommentable
  else
    BlogPost::CommentSetting.do_commentable
  end

  redirect_to request.env['HTTP_REFERER']
end