Mercurial > hg > soundsoftware-site
diff db/migrate/20090312194159_add_projects_trackers_unique_index.rb @ 1526:404aa68d4227
Merge from live branch
author | Chris Cannam |
---|---|
date | Thu, 11 Sep 2014 12:46:20 +0100 |
parents | 261b3d9a4903 |
children |
line wrap: on
line diff
--- a/db/migrate/20090312194159_add_projects_trackers_unique_index.rb Mon Mar 17 08:57:04 2014 +0000 +++ b/db/migrate/20090312194159_add_projects_trackers_unique_index.rb Thu Sep 11 12:46:20 2014 +0100 @@ -10,7 +10,7 @@ # 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