instance method previously_new_record?

Ruby on Rails 6.1.7.10

Since v6.1.7.10

Available in: v6.1.7.10 v7.0.10 v7.1.6 v7.2.3 v8.0.4 v8.1.2

Signature

previously_new_record?()

Returns true if this object was just created – that is, prior to the last save, the object didn’t exist in the database and new_record? would have returned true.

Source
# File activerecord/lib/active_record/persistence.rb, line 433
    def previously_new_record?
      @previously_new_record
    end

Defined in activerecord/lib/active_record/persistence.rb line 433 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveRecord::Persistence

Type at least 2 characters to search.

↑↓ navigate · open · esc close