diff options
author | multiple creatures <dev@multiple-creature.party> | 2019-12-10 05:17:51 -0600 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-12-10 05:17:51 -0600 |
commit | 533dd6d985430babe9cb8a1dc4dfc78d0e92b485 (patch) | |
tree | a3900fa5e564a69db13ca1edf342faad149830c0 /app/helpers | |
parent | 8975561bfae3e6b478b7c83d42174cab9b3bc147 (diff) |
`include` looks nicer
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/search_helper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/helpers/search_helper.rb b/app/helpers/search_helper.rb index 100fdddb9..991ba533b 100644 --- a/app/helpers/search_helper.rb +++ b/app/helpers/search_helper.rb @@ -9,7 +9,7 @@ module SearchHelper query_parts = query.split(':', 2) if query_parts[0] == 'tags' query = "^tags .*(#{query_parts[1].split.join('|')})" - elsif query_parts[0].in?(%w(subj text desc)) + elsif %w(subj text desc).include?(query_parts[0]) query = "^#{query_parts[0]} .*#{query_parts[1]}" end end |