Module: ActiveRecord::Clone

Extended by:
ActiveSupport::Concern
Defined in:
lib/active_record/clone.rb

Overview

Active Model Clone

Handles a simple task of cloning all attributes of a AR object Default behaviour is to not clone the foreign_keys.

Possible options is: :only => [] # only clone these attributes :exclude => [] # Exlude these attributes, default is :id :skip_relations => true|false #default is true

Can be configured either on a model layer using

class MyModel < ActiveRecord::Base can_clone end

Or can be configured upon the call to clone_ar.

Defined Under Namespace

Modules: ClassMethods, InstanceMethods