Flowdock
method

persisted?

Importance_1
Ruby on Rails latest stable (v6.1.7.7) - 0 notes - Class: ActiveResource::Base

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v3.2.13) is shown here.

These similar methods exist in v6.1.7.7:

persisted?() public

Returns true if this object has been saved, otherwise returns false.

Examples

persisted = Computer.create(:brand => 'Apple', :make => 'MacBook', :vendor => 'MacMall')
persisted.persisted? # => true

not_persisted = Computer.new(:brand => 'IBM', :make => 'Thinkpad', :vendor => 'IBM')
not_persisted.persisted? # => false

not_persisted.save
not_persisted.persisted? # => true
Show source
Register or log in to add new notes.