method

new_record?

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.

2Notes

Opposite of persisted?

kwerle · Nov 14, 20143 thanks

So I can find it when I look next time.

Not quite opposite of persisted?

hosh · Dec 2, 20151 thank

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