instance method
persisted?
Ruby on Rails 4.1.16
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 81
def persisted?
!(new_record? || destroyed?)
end
Defined in activerecord/lib/active_record/persistence.rb line 81
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::Persistence