diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2017-01-31 18:31:25 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2017-01-31 18:31:25 +0000 |
commit | fe906e4fb6b36b1d5e3c796cf0a256a427a8b228 (patch) | |
tree | 115111b3cf9ca7061242b995da49821f478f14b6 | |
parent | 1b911e51f9625082a5e61ca62a78db284383c1d2 (diff) | |
download | redmine-fe906e4fb6b36b1d5e3c796cf0a256a427a8b228.tar.gz redmine-fe906e4fb6b36b1d5e3c796cf0a256a427a8b228.zip |
Clean up sort orders.
git-svn-id: http://svn.redmine.org/redmine/trunk@16321 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | app/models/project.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index f071010e2..942affe11 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -43,15 +43,15 @@ class Project < ActiveRecord::Base has_many :queries, :dependent => :delete_all has_many :documents, :dependent => :destroy has_many :news, lambda {includes(:author)}, :dependent => :destroy - has_many :issue_categories, lambda {order("#{IssueCategory.table_name}.name")}, :dependent => :delete_all - has_many :boards, lambda {order("position ASC")}, :dependent => :destroy - has_one :repository, lambda {where(["is_default = ?", true])} + has_many :issue_categories, lambda {order(:name)}, :dependent => :delete_all + has_many :boards, lambda {order(:position)}, :dependent => :destroy + has_one :repository, lambda {where(:is_default => true)} has_many :repositories, :dependent => :destroy has_many :changesets, :through => :repository has_one :wiki, :dependent => :destroy # Custom field for the project issues has_and_belongs_to_many :issue_custom_fields, - lambda {order("#{CustomField.table_name}.position")}, + lambda {order(:position)}, :class_name => 'IssueCustomField', :join_table => "#{table_name_prefix}custom_fields_projects#{table_name_suffix}", :association_foreign_key => 'custom_field_id' |