Flowdock
method

persisted?

Importance_2
Ruby on Rails latest stable (v4.2.1) - 2 notes - Class: ActiveRecord::Persistence
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