From fa1e0757634656414a8fb62d8bcf1ec0717537df Mon Sep 17 00:00:00 2001 From: James McKinney Date: Thu, 21 May 2015 14:05:09 +0200 Subject: AdminUserController: remove unused instance variable and avoid unneeded ternary --- app/controllers/admin_user_controller.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'app/controllers/admin_user_controller.rb') diff --git a/app/controllers/admin_user_controller.rb b/app/controllers/admin_user_controller.rb index 56c4c81e9..8ebc450f6 100644 --- a/app/controllers/admin_user_controller.rb +++ b/app/controllers/admin_user_controller.rb @@ -86,8 +86,7 @@ class AdminUserController < AdminController end def modify_comment_visibility - @visibility_value = params.key?(:hide_selected) ? false : true - Comment.update_all(["visible=?", @visibility_value], :id => params[:comment_ids]) + Comment.update_all(["visible = ?", !params[:hide_selected]], :id => params[:comment_ids]) redirect_to :back end -- cgit v1.2.3