summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2016-11-28 05:54:14 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2016-11-28 05:54:14 +0000
commit65e08b259d6506a2303a642844dc65a4b9654463 (patch)
tree6beacb1f3964eab4e93476974949c63d70571347
parenta373e304b3d5957306115018175c7f8cd938be2c (diff)
downloadredmine-65e08b259d6506a2303a642844dc65a4b9654463.tar.gz
redmine-65e08b259d6506a2303a642844dc65a4b9654463.zip
use symbol instead of string for 'position' (#24013)
git-svn-id: http://svn.redmine.org/redmine/trunk@16008 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--app/models/custom_field.rb2
-rw-r--r--test/object_helpers.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/models/custom_field.rb b/app/models/custom_field.rb
index 8936a6d66..400ee56b5 100644
--- a/app/models/custom_field.rb
+++ b/app/models/custom_field.rb
@@ -249,7 +249,7 @@ class CustomField < ActiveRecord::Base
# to move in project_custom_field
def self.for_all
- where(:is_for_all => true).order('position').to_a
+ where(:is_for_all => true).order(:position).to_a
end
def type_name
diff --git a/test/object_helpers.rb b/test/object_helpers.rb
index 3928dd5cc..f827cd150 100644
--- a/test/object_helpers.rb
+++ b/test/object_helpers.rb
@@ -65,7 +65,7 @@ module ObjectHelpers
@generated_tracker_name.succ!
tracker = Tracker.new(attributes)
tracker.name = @generated_tracker_name.dup if tracker.name.blank?
- tracker.default_status ||= IssueStatus.order('position').first || IssueStatus.generate!
+ tracker.default_status ||= IssueStatus.order(:position).first || IssueStatus.generate!
yield tracker if block_given?
tracker
end