new_record?() public

Returns true if this object hasn’t been saved yet – that is, a record for the object doesn’t exist in the database yet; otherwise, returns false.

Show source
Register or log in to add new notes.
November 14, 2014
3 thanks

Opposite of persisted?

So I can find it when I look next time.

December 2, 2015
1 thank

Not quite opposite of persisted?

persisted? will also check if the record has not been destroyed