]> source.dussan.org Git - redmine.git/commitdiff
use symbol instead of string for 'position' (#24013)
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Mon, 28 Nov 2016 05:54:14 +0000 (05:54 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Mon, 28 Nov 2016 05:54:14 +0000 (05:54 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@16008 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/custom_field.rb
test/object_helpers.rb

index 8936a6d661771ff2881eb8e434ae225b5c7fe94e..400ee56b5f3378c41ea10ba65d25b19c60fc23e4 100644 (file)
@@ -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
index 3928dd5cc873ecb181bd99f9afd066aaec439d51..f827cd150233585d85db2b5240abe407bb8a38c9 100644 (file)
@@ -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