From 74a6ff023075edec4d92ea5ba229b321f33e72c5 Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Sat, 3 Apr 2021 01:34:45 +0000 Subject: Replace pluck().first with pick() (#32909). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Patch by Pavel Rosický and Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@20907 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- db/migrate/20141029181824_remove_issue_statuses_is_default.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'db/migrate/20141029181824_remove_issue_statuses_is_default.rb') diff --git a/db/migrate/20141029181824_remove_issue_statuses_is_default.rb b/db/migrate/20141029181824_remove_issue_statuses_is_default.rb index 09808e31c..94b518ea3 100644 --- a/db/migrate/20141029181824_remove_issue_statuses_is_default.rb +++ b/db/migrate/20141029181824_remove_issue_statuses_is_default.rb @@ -6,7 +6,7 @@ class RemoveIssueStatusesIsDefault < ActiveRecord::Migration[4.2] def down add_column :issue_statuses, :is_default, :boolean, :null => false, :default => false # Restores the first status as default - default_status_id = IssueStatus.order(:position).pluck(:id).first + default_status_id = IssueStatus.order(:position).pick(:id) IssueStatus.where(:id => default_status_id).update_all(:is_default => true) end end -- cgit v1.2.3