diff options
Diffstat (limited to 'app/models/milestone.rb')
-rw-r--r-- | app/models/milestone.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/models/milestone.rb b/app/models/milestone.rb index 868bee9961b..2c95cc2672c 100644 --- a/app/models/milestone.rb +++ b/app/models/milestone.rb @@ -52,6 +52,17 @@ class Milestone < ApplicationRecord state :active end + # Searches for timeboxes with a matching title. + # + # This method uses ILIKE on PostgreSQL + # + # query - The search query as a String + # + # Returns an ActiveRecord::Relation. + def self.search_title(query) + fuzzy_search(query, [:title]) + end + def self.min_chars_for_partial_matching 2 end |