KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm trying to seed a database in Rails 3 with images using CarrierWave, however nothing I try seems to work short of having to upload them all by hand. pi = ProductImage.new(:product => product) pi.image = File.open(File.join(Rails.root, 'test.jpg')) pi.store_image! # tried with and without this product.product_images << pi product.save! Anybody know how to seed using CarrierWave at all?
Tags (comma-separated)
Save Edits
Cancel