Skip to content

Instantly share code, notes, and snippets.

@reinh
Created October 28, 2009 22:50
Show Gist options
  • Save reinh/220946 to your computer and use it in GitHub Desktop.
Save reinh/220946 to your computer and use it in GitHub Desktop.
# TODO - add dependent option support
def delete_records(records)
klass = @reflection.through_reflection.klass
records.each do |associate|
klass.delete_all(construct_join_attributes(associate))
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment