2010-03-04 52 views

回答

0

嘗試類似:

associated_category = Category.find_by_name(row['Category']) 
Produkt.create(
     :category_id => associated_category.id, 
     :name => row[2] 
     ) 

我這樣做的:http://gist.github.com/324613

危害

相關問題