Flowdock
method

dup

Importance_2
Ruby on Rails latest stable (v6.1.7.7) - 1 note - Class: ActiveResource::Base

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v3.2.13) is shown here.

These similar methods exist in v6.1.7.7:

dup() public

Duplicates the current resource without saving it.

Examples

my_invoice = Invoice.create(:customer => 'That Company')
next_invoice = my_invoice.dup
next_invoice.new? # => true

next_invoice.save
next_invoice == my_invoice # => false (different id attributes)

my_invoice.customer   # => That Company
next_invoice.customer # => That Company
Show source