instance method
new_record?
Ruby on Rails 3.0.20
Since v3.0.20Signature
new_record?()
Returns true if this object hasn’t been saved yet – that is, a record for the object doesn’t exist in the data store yet; otherwise, returns false.
Source
# File activerecord/lib/active_record/persistence.rb, line 6
def new_record?
@new_record
end
Defined in activerecord/lib/active_record/persistence.rb line 6
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::Persistence