Remove critical status from Issue. Move sort instead

This commit is contained in:
Dmitriy Zaporozhets 2012-06-27 21:30:35 +03:00
parent 1b1e77c728
commit 50fdb2e7df
12 changed files with 30 additions and 65 deletions

View file

@ -33,9 +33,6 @@ class Issue < ActiveRecord::Base
validates :description,
: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)}

View file

@ -13,7 +13,7 @@ class Project < ActiveRecord::Base
has_many :users, :through => :users_projects
has_many :events, :dependent => :destroy
has_many :merge_requests, :dependent => :destroy
has_many :issues, :dependent => :destroy, :order => "position"
has_many :issues, :dependent => :destroy, :order => "closed, position"
has_many :milestones, :dependent => :destroy
has_many :users_projects, :dependent => :destroy
has_many :notes, :dependent => :destroy