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