Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
test
MIT-LICENSE
README.rdoc
Rakefile
about.yml about.yml added Mar 29, 2008
init.rb

README.rdoc

Deep Cloning Plugin

This plugin gives every ActiveRecord::Base object the possibility to do a deep clone.

Repository is on github: github.com/DefV/deep_cloning/tree/master

Install with:

script/plugin install git://github.com/DefV/deep_cloning.git

Example

Cloning a model without an attribute

pirate.clone :except => :name

Cloning a model without multiple attributes

pirate.clone :except => [:name, :nick_name]

Cloning one single association

pirate.clone :include => :mateys

Cloning multiple associations

pirate.clone :include => [:mateys, :treasures]

Cloning really deep

pirate.clone :include => {:treasures => :gold_pieces}

Cloning really deep with multiple associations

pirate.clone :include => [:mateys, {:treasures => :gold_pieces}]

Copyright © 2008 Jan De Poorter, released under the MIT license