Oops, I mean
b.each do |x|
Bakery.new do |y|
y.name = x
end
end
On May 28, 3:53 am, Nik <NiKS...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Hello,
>
> So I have this massive array 10k+ items in it
> b
>
=>["aaa","aab",...,"aba","abb",..."zza","zzb","zzc",...,"zzz"]
>
> I need to save them in the Bakery model
> I tried to do
> Bakery.find(1)
> =>{:id=>1, :name => "afe"}
>
> b.each do |x|
> Bakery.new do |b|
> b.name = x
> end
> end
>
> I know my home computer can''t really beat a server grade machine,
but
> it still took nearly a minute to process. Is there anyway that this
> can be faster?
>
> Thanks!