Schema Information
Table name: milestones
id :integer not null, primary key title :string(255) not null project_id :integer not null description :text due_date :date closed :boolean default(FALSE), not null created_at :datetime not null updated_at :datetime not null
Methods
- A
- C
- E
- I
- O
- P
- T
Attributes
[RW] | author_id_of_changes |
Instance Public methods
can_be_closed?()
Link
Source: show
# File app/models/milestone.rb, line 70 def can_be_closed? open? && issues.opened.count.zero? end
closed_items_count()
Link
Source: show
# File app/models/milestone.rb, line 46 def closed_items_count self.issues.closed.count + self.merge_requests.closed.count end
expired?()
Link
Source: show
# File app/models/milestone.rb, line 30 def expired? if due_date due_date.past? else false end end
expires_at()
Link
Source: show
# File app/models/milestone.rb, line 60 def expires_at if due_date if due_date.past? "expired at #{due_date.stamp("Aug 21, 2011")}" else "expires at #{due_date.stamp("Aug 21, 2011")}" end end end
is_empty?()
Link
Source: show
# File app/models/milestone.rb, line 74 def is_empty? total_items_count.zero? end
open_items_count()
Link
Source: show
# File app/models/milestone.rb, line 42 def open_items_count self.issues.opened.count + self.merge_requests.opened.count end
participants()
Link
Source: show
# File app/models/milestone.rb, line 38 def participants User.where(id: issues.pluck(:assignee_id)) end