method

clone

rails latest stable - Class: ActiveRecord::Base

Method deprecated or moved

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

clone()
public

Returns a clone of the record that hasn’t been assigned an id yet and is treated as a new record. Note that this is a "shallow" clone: it copies the object’s attributes only, not its associations. The extent of a "deep" clone is application-specific and is therefore left to the application to implement according to its need.