Scary Rails - delete_all run wild
27 Jan 2011Don't do this (deletes all memberships, then throws error):
Membership.delete_all[ "can_switch_to = ?", false]
Correct code:
Membership.delete_all ["can_switch_to = ?", false]
See the difference? I understand why it does what it does, but still... Scary.