From 533dd6d985430babe9cb8a1dc4dfc78d0e92b485 Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Tue, 10 Dec 2019 05:17:51 -0600 Subject: `include` looks nicer --- app/helpers/search_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit