instance method
dup
Ruby on Rails 7.0.10
Since v4.0.13Duped objects have no id assigned and are treated as new records. Note that this is a “shallow” copy as it copies the object’s attributes only, not its associations. The extent of a “deep” copy is application specific and is therefore left to the application to implement according to its need. The dup method does not preserve the timestamps (created|updated)_(at|on).
Source
# File activerecord/lib/active_record/core.rb, line 531
Defined in activerecord/lib/active_record/core.rb line 531
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::Core