lib/active_remote/persistence.rb in active_remote-1.3.2 vs lib/active_remote/persistence.rb in active_remote-1.3.3

- old
+ new

@@ -74,11 +74,12 @@ # wrong. Returns the frozen instance. # def delete raise ReadOnlyRemoteRecord if readonly? execute(:delete, attributes.slice("guid")) - freeze if success? + + return success? ? freeze : false end # Deletes the record from the service (the service determines if the # record is hard or soft deleted) and freezes this instance to indicate # that no changes should be made (since they can't be persisted). If the @@ -96,10 +97,11 @@ # messages indicating what went wrong. Returns the frozen instance. # def destroy raise ReadOnlyRemoteRecord if readonly? execute(:destroy, attributes.slice("guid")) - freeze if success? + + return success? ? freeze : false end # Destroys (hard deletes) the record from the service and freezes this # instance to indicate that no changes should be made (since they can't # be persisted). If the record was not deleted, an exception will be