summaryrefslogtreecommitdiffstats
path: root/db/migrate/20141029181752_add_trackers_default_status_id.rb
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2021-04-03 01:34:45 +0000
committerGo MAEDA <maeda@farend.jp>2021-04-03 01:34:45 +0000
commit74a6ff023075edec4d92ea5ba229b321f33e72c5 (patch)
treed0fb7fcec004ff916f112eb55a7e8da8f5b4f1fb /db/migrate/20141029181752_add_trackers_default_status_id.rb
parent1eefff4d9c8a214f6abf07ad3bd3c4dcbf66931b (diff)
downloadredmine-74a6ff023075edec4d92ea5ba229b321f33e72c5.tar.gz
redmine-74a6ff023075edec4d92ea5ba229b321f33e72c5.zip
Replace pluck().first with pick() (#32909).
Patch by Pavel Rosický and Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@20907 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'db/migrate/20141029181752_add_trackers_default_status_id.rb')
-rw-r--r--db/migrate/20141029181752_add_trackers_default_status_id.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/db/migrate/20141029181752_add_trackers_default_status_id.rb b/db/migrate/20141029181752_add_trackers_default_status_id.rb
index 74716ea63..043be0c68 100644
--- a/db/migrate/20141029181752_add_trackers_default_status_id.rb
+++ b/db/migrate/20141029181752_add_trackers_default_status_id.rb
@@ -2,8 +2,8 @@ class AddTrackersDefaultStatusId < ActiveRecord::Migration[4.2]
def up
add_column :trackers, :default_status_id, :integer
- status_id = IssueStatus.where(:is_default => true).pluck(:id).first
- status_id ||= IssueStatus.order(:position).pluck(:id).first
+ status_id = IssueStatus.where(:is_default => true).pick(:id)
+ status_id ||= IssueStatus.order(:position).pick(:id)
if status_id
Tracker.update_all :default_status_id => status_id
end