instance method
previously_persisted?
Ruby on Rails 7.0.10
Since v7.0.10Signature
previously_persisted?()
Returns true if this object was previously persisted but now it has been deleted.
Source
# File activerecord/lib/active_record/persistence.rb, line 574
def previously_persisted?
!new_record? && destroyed?
end
Defined in activerecord/lib/active_record/persistence.rb line 574
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::Persistence