mirror of
https://github.com/wahyd4/ocelots.git
synced 2026-08-09 04:56:21 +10:00
add a script for remove duplicate membership
This commit is contained in:
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user