Commit aeabf778 authored by marutosijp's avatar marutosijp

use symbol instead of string for 'position' (#24013)

git-svn-id: https://svn.redmine.org/redmine/trunk@16008 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 07a9d281
......@@ -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
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment