summaryrefslogtreecommitdiffstats
path: root/app/models
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-12-02 19:16:32 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-12-02 19:16:32 +0000
commit96fca0b08f6d60e8736e8e3f95a5d0ae33779068 (patch)
treec3414fd53dad2b36bab58d898653fb9f53ff6a60 /app/models
parentbd10a712177e8b13dd95b6a55ae195c2d33b3ef0 (diff)
downloadredmine-96fca0b08f6d60e8736e8e3f95a5d0ae33779068.tar.gz
redmine-96fca0b08f6d60e8736e8e3f95a5d0ae33779068.zip
Replaces find(:all) calls.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10916 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models')
-rw-r--r--app/models/custom_field.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/custom_field.rb b/app/models/custom_field.rb
index 22f29d3ac..08c66b57b 100644
--- a/app/models/custom_field.rb
+++ b/app/models/custom_field.rb
@@ -30,6 +30,8 @@ class CustomField < ActiveRecord::Base
validate :validate_custom_field
before_validation :set_searchable
+ scope :sorted, order("#{table_name}.position ASC")
+
CUSTOM_FIELDS_TABS = [
{:name => 'IssueCustomField', :partial => 'custom_fields/index',
:label => :label_issue_plural},