@@ -43,15 +43,15 class Project < ActiveRecord::Base | |||
|
43 | 43 | has_many :queries, :dependent => :delete_all |
|
44 | 44 | has_many :documents, :dependent => :destroy |
|
45 | 45 | has_many :news, lambda {includes(:author)}, :dependent => :destroy |
|
46 |
has_many :issue_categories, lambda {order( |
|
|
47 |
has_many :boards, lambda {order( |
|
|
48 |
has_one :repository, lambda {where( |
|
|
46 | has_many :issue_categories, lambda {order(:name)}, :dependent => :delete_all | |
|
47 | has_many :boards, lambda {order(:position)}, :dependent => :destroy | |
|
48 | has_one :repository, lambda {where(:is_default => true)} | |
|
49 | 49 | has_many :repositories, :dependent => :destroy |
|
50 | 50 | has_many :changesets, :through => :repository |
|
51 | 51 | has_one :wiki, :dependent => :destroy |
|
52 | 52 | # Custom field for the project issues |
|
53 | 53 | has_and_belongs_to_many :issue_custom_fields, |
|
54 |
lambda {order( |
|
|
54 | lambda {order(:position)}, | |
|
55 | 55 | :class_name => 'IssueCustomField', |
|
56 | 56 | :join_table => "#{table_name_prefix}custom_fields_projects#{table_name_suffix}", |
|
57 | 57 | :association_foreign_key => 'custom_field_id' |
General Comments 0
You need to be logged in to leave comments.
Login now