public
Description: DeepCloning plugin
Homepage: http://blog.defv.be/2008/3/27/activerecord-deepclone-plugin
Clone URL: git://github.com/DefV/deep_cloning.git
Search Repo:
DefV (author)
Thu Mar 27 12:14:34 -0700 2008
commit  aa69411c83b3bcceb96ab71feb948a7b3236c1a3
tree    1b54c2cd631eeb80abd41485dbe184af4a56d5fd
parent  d3ee15e97ffa36a605800fbcb91b1c2777247b3d
name age message
folder MIT-LICENSE Thu Mar 27 09:15:50 -0700 2008 Initial Import [DefV]
folder README Thu Mar 27 12:14:34 -0700 2008 Added more documentation and a README [DefV]
folder Rakefile Thu Mar 27 12:14:34 -0700 2008 Added more documentation and a README [DefV]
folder init.rb Thu Mar 27 11:53:30 -0700 2008 Added testing suite and plugin tests [DefV]
folder lib/ Thu Mar 27 12:14:34 -0700 2008 Added more documentation and a README [DefV]
folder test/ Thu Mar 27 12:14:34 -0700 2008 Added more documentation and a README [DefV]
README
= Deep Cloning Plugin

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

Repository is on github: http://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}

Copyright (c) 2008 Jan De Poorter, released under the MIT license