diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-12-02 20:28:37 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-12-02 20:28:37 +0000 |
commit | abd921736b6db3a405c6505b3bf4022bb9097d41 (patch) | |
tree | 1cd6958b0826f9426b769cb5f41eccea52a71350 /db/migrate/20090312194159_add_projects_trackers_unique_index.rb | |
parent | 536747b74708188848d85d8de5df34e7aa762006 (diff) | |
download | redmine-abd921736b6db3a405c6505b3bf4022bb9097d41.tar.gz redmine-abd921736b6db3a405c6505b3bf4022bb9097d41.zip |
Replaces find(:all) calls.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10918 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'db/migrate/20090312194159_add_projects_trackers_unique_index.rb')
-rw-r--r-- | db/migrate/20090312194159_add_projects_trackers_unique_index.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/db/migrate/20090312194159_add_projects_trackers_unique_index.rb b/db/migrate/20090312194159_add_projects_trackers_unique_index.rb index 02a8fa68e..f4e3a26d2 100644 --- a/db/migrate/20090312194159_add_projects_trackers_unique_index.rb +++ b/db/migrate/20090312194159_add_projects_trackers_unique_index.rb @@ -10,7 +10,7 @@ class AddProjectsTrackersUniqueIndex < ActiveRecord::Migration # Removes duplicates in projects_trackers table def self.remove_duplicates - Project.find(:all).each do |project| + Project.all.each do |project| ids = project.trackers.collect(&:id) unless ids == ids.uniq project.trackers.clear |