diff options
Diffstat (limited to 'app/models/milestone.rb')
-rw-r--r-- | app/models/milestone.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/milestone.rb b/app/models/milestone.rb index d979a35084b..84acba30b6b 100644 --- a/app/models/milestone.rb +++ b/app/models/milestone.rb @@ -16,7 +16,9 @@ class Milestone < ActiveRecord::Base # Represents a "No Milestone" state used for filtering Issues and Merge # Requests that have no milestone assigned. - None = Struct.new(:title).new('No Milestone') + MilestoneStruct = Struct.new(:title, :name) + None = MilestoneStruct.new('No Milestone', 'No Milestone') + Any = MilestoneStruct.new('Any', '') include InternalId include Sortable @@ -47,6 +49,8 @@ class Milestone < ActiveRecord::Base state :active end + alias_attribute :name, :title + class << self def search(query) query = "%#{query}%" |