Return to Snippet

Revision: 24766
at March 10, 2010 18:39 by inkdeep


Initial Code
#For syncing models between db's/tables/whateva: 
local.attributes = remote.attributes.inject({}){|h,(k,v)| h[k]=v if Model.column_names.include?(k); h }

Initial URL

                                

Initial Description

                                

Initial Title
Copy object Attributes to another object in Ruby

Initial Tags
rails, ruby, copy

Initial Language
Ruby