From: Toshi MARUYAMA Date: Mon, 28 Nov 2016 05:54:14 +0000 (+0000) Subject: use symbol instead of string for 'position' (#24013) X-Git-Tag: 3.4.0~557 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=65e08b259d6506a2303a642844dc65a4b9654463;p=redmine.git use symbol instead of string for 'position' (#24013) git-svn-id: http://svn.redmine.org/redmine/trunk@16008 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- 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