populated seeds

SEED_MULTIPLIER works up to 20 at least (takes 3-4 min), creating 2500 users
Yeah, this is not how I would do it if I wanted elegant data, but it was
the first thing that came to mind, and I'm not that concerned that the very
first signup user doesn't get an order. narratively, they could have been a
test user.

On Fri, Oct 3, 2014 at 6:54 PM, Andur Carr <notifications@github.com> wrote:

> In db/seeds.rb:
>
> > +  end
> > +
> > +end
> > +
> > +
> > +
> > +
> > +
> > +# populate a historical record of at least 100 orders staggered throughout the past year. Show growth in the rate of orders over time.
> > +#populate at least 25 shopping carts
> > +
> > +num_orders = 125 * SEED_MULTIPLIER
> > +
> > +0.upto(num_orders-1) do |order_id|
> > +  o = Order.new
> > +  o.userid = 0 #will change outside this loop
>
> I had noticed a pattern developing with the use of 0 as a locator for
> entries that have not been set. However, won't this mean that the user with
> id = 0 (per lines 18-20) will have no associated orders?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/vikingeducation/viking_store/pull/1/files#r18426936>.
>



-- 

*Michael Alexander*

(310) 429-8822

alexandermw@gmail.com