foodsoft/db/migrate/20140921104907_remove_stale_memberships.rb
2014-09-21 12:54:01 +02:00

5 lines
140 B
Ruby

class RemoveStaleMemberships < ActiveRecord::Migration
def up
Membership.where("group_id NOT IN (?)", Group.ids).delete_all
end
end