persisted?() public

Returns true if the record is persisted, i.e. it’s not a new record and it was not destroyed, otherwise returns false.

Show source
Register or log in to add new notes.
November 14, 2014
1 thank

Opposite of #new_record?

So that next time I look I find it.

December 2, 2015
0 thanks

Not quite opposite of new_record?

new_record? will not check if the record has been destroyed