Not initializing variable for looping if unused in loop

This commit is contained in:
Akshay
2014-08-15 03:24:55 +05:30
parent 6cc8ec87b5
commit 6301a43d57
15 changed files with 21 additions and 21 deletions

View File

@ -18,7 +18,7 @@ class AdminUserIndexQuery
end
def filter_by_trust
levels = trust_levels.map { |key, value| key.to_s }
levels = trust_levels.map { |key, _| key.to_s }
if levels.include?(params[:query])
@query.where('trust_level = ?', trust_levels[params[:query].to_sym])
end