/ Published in: Ruby
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
#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 }