Add critical status to issues

This commit is contained in:
gitlabhq 2011-10-25 07:34:02 +03:00
parent afe98ae74a
commit 9afee5ad52
8 changed files with 84 additions and 10 deletions

View file

@ -18,11 +18,22 @@ class Issue < ActiveRecord::Base
:presence => true,
:length => { :within => 0..2000 }
scope :critical, where(:critical => true)
scope :non_critical, where(:critical => false)
scope :opened, where(:closed => false)
scope :closed, where(:closed => true)
scope :assigned, lambda { |u| where(:assignee_id => u.id)}
acts_as_list
def today?
Date.today == created_at.to_date
end
def new?
today? && created_at == updated_at
end
end
# == Schema Information
#