remove unneeded to_a

pull/3011/head
Toshi MARUYAMA 10 years ago
parent 55a2207631
commit 1b3628b60c
  1. 4
      app/models/project/copy.rb

@ -142,7 +142,7 @@ module Project::Copy
# Reassign fixed_versions by name, since names are unique per
# project and the versions for self are not yet saved
if issue.fixed_version
new_version = versions.to_a.detect { |v| v.name == issue.fixed_version.name }
new_version = versions.detect { |v| v.name == issue.fixed_version.name }
if new_version
new_issue.skip_fixed_version_validation = true
new_issue.fixed_version = new_version
@ -151,7 +151,7 @@ module Project::Copy
# Reassign the category by name, since names are unique per
# project and the categories for self are not yet saved
if issue.category
new_issue.category = categories.to_a.detect { |c| c.name == issue.category.name }
new_issue.category = categories.detect { |c| c.name == issue.category.name }
end
# Parent issue
if issue.parent_id

Loading…
Cancel
Save