instance method
persisted?
Ruby on Rails 6.0.6
Since v4.0.13 Last seen in v6.1.7.10Signature
persisted?()
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
Source
# File activemodel/lib/active_model/model.rb, line 95
def persisted?
false
end
Defined in activemodel/lib/active_model/model.rb line 95
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveModel::Model