instance method
persisted?
Ruby on Rails 8.0.4
Since v3.0.20Signature
persisted?()
Returns true if the record is persisted, i.e. it’s not a new record and it was not destroyed, otherwise returns false.
Source
# File activerecord/lib/active_record/persistence.rb, line 361
def persisted?
!(@new_record || @destroyed)
end
Defined in activerecord/lib/active_record/persistence.rb line 361
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::Persistence