No reason.  It can be whatever number of times you decide.  If you want to
show the user a form with 10 delivery items, then it would be 10.times.

On Mon, Aug 1, 2011 at 1:30 PM, Mauro <[email protected]> wrote:

> On 1 August 2011 12:20, Chris Kottom <[email protected]> wrote:
> > Never used simple_form, but I'd try it like this.  Forgive me if the
> syntax
> > isn't quite right.
> > controller:
> >
> > def show
> >
> >   @customer = Customer.find(params[:id])
> >   @delivery = @customer.deliveries.build
> >
> >   3.times { @delivery.delivery_items.build }รน
>
> why 3.times?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to