Flowdock
method

persisted?

Importance_1
Ruby on Rails latest stable (v6.1.7.7) - 0 notes - Class: Model
persisted?() public

Indicates if the model is persisted. Default is false.

class Person
  include ActiveModel::Model
  attr_accessor :id, :name
end

person = Person.new(id: 1, name: 'bob')
person.persisted? # => false
Show source
Register or log in to add new notes.