Plugins - deep_cloning

StarAdd to favorites

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

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}

Jan De Poorter (DefV)

http://blog.defv.be/2008/3/27/activerecord-deepclone-plugin

git://github.com/DefV/deep_cloning.git

Rails' (MIT)

  • Currently 4.0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Model

Tags

Comments

Add a comment

Search Plugins

Query syntax

Plugins by Category

Sponsors

Rails Kits: Get Code. Get Moving.

Have a comment?