goncalossilva/rails3_acts_as_paranoid — pull request #94 by dmathieu (2013-01-22 14:53:56+00:00)
Title: Don't fail when trying to remove an unsaved object

When trying to destroy an unsaved object (this happens in some of our tests), acts as paranoid tries to remove the object, and calls it's id for that with

Array(self.class.primary_key), Array(self.id)].transpose

As `self.id` is nil, transpose can't work because the array is missing an entry.
And we don't need to run any sql query to remove an object if nothing has been saved into the database yet.