Skip to content

Commit

Permalink
rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Keller committed Apr 2, 2018
1 parent 2fe7437 commit 79321bc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/helpers/search_helper.rb
Expand Up @@ -5,7 +5,7 @@ def self.parse_search_params(params, symbol, user)
input = params[symbol] || ''

if params[is_regex?(symbol)]
operation = if user != nil and user.can_use_regex_search?
operation = if !user.nil? && user.can_use_regex_search?
params[is_inverse_regex?(symbol)] ? 'NOT REGEXP' : 'REGEXP'
else
false
Expand Down
2 changes: 1 addition & 1 deletion app/models/user.rb
Expand Up @@ -253,6 +253,6 @@ def has_pinned_role?(role)
end

def can_use_regex_search?
has_role? :reviewer or moderator_sites.any?
has_role? :reviewer || moderator_sites.any?
end
end

0 comments on commit 79321bc

Please sign in to comment.