public
Description: DeepCloning plugin
Homepage: http://blog.defv.be/2008/3/27/activerecord-deepclone-plugin
Clone URL: git://github.com/DefV/deep_cloning.git
commit  f36a015483cabee9b131a1fe4a0ca942f6afef0e
tree    cdaf1eb0a2ceaad72e4f512214b913a9e7033d94
parent  e77cccecb2a93327ce629d7b488f7335273f3f1b
name age message
file MIT-LICENSE Fri Mar 28 06:17:34 -0700 2008 License ;-) [DefV]
file README Thu Mar 27 12:14:34 -0700 2008 Added more documentation and a README [DefV]
file Rakefile Thu Mar 27 12:14:34 -0700 2008 Added more documentation and a README [DefV]
file about.yml Sat Mar 29 13:12:04 -0700 2008 about.yml added [DefV]
file init.rb Thu Mar 27 11:53:30 -0700 2008 Added testing suite and plugin tests [DefV]
directory lib/ Mon Mar 31 00:27:42 -0700 2008 Using the nicer Array(obj) instead of [*obj] to... [DefV]
directory test/ Fri Mar 28 03:16:57 -0700 2008 A lot of refactoring. Code is more DRY, and doe... [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