Skip to content
This repository has been archived by the owner on Jan 27, 2019. It is now read-only.

Commit

Permalink
add a script for remove duplicate membership
Browse files Browse the repository at this point in the history
  • Loading branch information
szpyxlwoni committed Nov 22, 2012
1 parent fc2bf50 commit ec89c90
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions script/remove_dup_membership.rb
@@ -0,0 +1,7 @@
h = Hash.new
Membership.find(:all).each{|membership|
if mem = h[[membership.person_id,membership.team_id]]
Membership.destroy(mem)
end
h[[membership.person_id,membership.team_id]] = membership
}

0 comments on commit ec89c90

Please sign in to comment.