Duplicate Active Record with has_many relationships
old_model.find(old_model_id)2 months ago • 0 notes
new_model = MyModel.new(old_model.attributes)
new_model.some_collection << old_model.some_collection.collect{|x| x.clone}
new_model.save
old_model.find(old_model_id)2 months ago • 0 notes
new_model = MyModel.new(old_model.attributes)
new_model.some_collection << old_model.some_collection.collect{|x| x.clone}
new_model.save
Data Fabric has been great so far with our new project requiring horizontal partitioning.
We created this rakefile modification to help with db:migrate / db:rollback: http://gist.github.com/176353
2 months ago • 0 notesThis article was a tremendous help in getting swfupload to work correctly with rails 2.3 and acts_as_authenticated.
9 months ago • 0 notesI had a problem where i had a 580mb dmg and wanted to burn to 700mb CDR… For some reason, Disk Utility prevented me from burning saying that the disk size wasn’t big enough. I ran the following command on a folder with the .dmg file and it converted it to an .iso. Disk Utility then allowed me to burn to the same CD:
hdiutil makehybrid -o isofilename folderwithdmg
This should create isofilename.iso which you should be able to burn with disk utility.
1 year ago • 0 notesSince pagination has been removed from the rails 2.0 core framework, will_pagination plugin looks like a great alternative:
- http://errtheblog.com/posts/69-paginatin-christmas
- http://agilewebdevelopment.com/plugins/will_paginate
1 year ago • 0 notes