diff --git a/app/models/command/parser.rb b/app/models/command/parser.rb index 4d93fa30f..c0d9e8650 100644 --- a/app/models/command/parser.rb +++ b/app/models/command/parser.rb @@ -21,14 +21,6 @@ class Command::Parser end private - def search(string) - if card = user.accessible_cards.find_by_id(string) - Command::GoToCard.new(card_id: card.id) - else - Command::Search.new(query: string) - end - end - def assignees_from(strings) Array(strings).filter_map do |string| assignee_from(string) @@ -41,4 +33,12 @@ class Command::Parser string_without_at = string.delete_prefix("@") User.all.find { |user| user.mentionable_handles.include?(string_without_at) } end + + def search(string) + if card = user.accessible_cards.find_by_id(string) + Command::GoToCard.new(card_id: card.id) + else + Command::Search.new(query: string) + end + end end