summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorgitlabhq <m@gitlabhq.com>2011-10-15 20:54:39 +0300
committergitlabhq <m@gitlabhq.com>2011-10-15 20:54:39 +0300
commit99777cab2a64a94cc6798a6f1ac562850bc08172 (patch)
treee64cc06d6f704673e4495caeea749ceb9f51eb91 /app/models
parentc37492b5dcd8188bc2f738e7a8994855926a2d83 (diff)
parente6bba9be4f0400471170e9d86f3ef15344416f2f (diff)
downloadgitlab-ce-99777cab2a64a94cc6798a6f1ac562850bc08172.tar.gz
Merge branch 'issue_im'
Conflicts: config/initializers/rails_footnotes.rb
Diffstat (limited to 'app/models')
-rw-r--r--app/models/issue.rb2
-rw-r--r--app/models/project.rb2
2 files changed, 3 insertions, 1 deletions
diff --git a/app/models/issue.rb b/app/models/issue.rb
index 0399607efe6..9b1b923eaa0 100644
--- a/app/models/issue.rb
+++ b/app/models/issue.rb
@@ -21,6 +21,8 @@ class Issue < ActiveRecord::Base
scope :opened, where(:closed => false)
scope :closed, where(:closed => true)
scope :assigned, lambda { |u| where(:assignee_id => u.id)}
+
+ acts_as_list
end
# == Schema Information
#
diff --git a/app/models/project.rb b/app/models/project.rb
index 0d90af866bf..3c07976d24e 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -3,7 +3,7 @@ require "grit"
class Project < ActiveRecord::Base
belongs_to :owner, :class_name => "User"
- has_many :issues, :dependent => :destroy
+ has_many :issues, :dependent => :destroy, :order => "position"
has_many :users_projects, :dependent => :destroy
has_many :users, :through => :users_projects
has_many :notes, :dependent => :destroy