Thanks, that what I was looking for. Just found it in the source code. Works like a charm. Thanks Frederick.
On Jun 15, 12:34 pm, Frederick Cheung <[email protected]> wrote: > On Jun 15, 5:05 pm, Dee <[email protected]> wrote: > > > Thanks for replying, Hassan. > > > I don't think you're missing the point, and, yes, that's what *I* > > think it should be too. The problem is "item" is type > > ActionView:Helpers:FormBuilder, and therefore doesn't have a sku > > property. Or maybe /I'm/ missing something > > if you've got a form builder then form_builder.object is the object it > is bound to. > > Fred > > > (I tried to make that clearer by naming it "item_fields" rather than > > just "item" as you've done here.) > > > Dee > > > On Jun 15, 10:30 am, Hassan Schroeder <[email protected]> > > wrote: > > > > On Tue, Jun 15, 2010 at 7:14 AM,Dee<[email protected]> wrote: > > > > Explain how to display the sku and color in the form for each item? > > > > <% f.fields_for @shelf.items do |item_fields| %> > > > > <%# ****Want :sku here**** #%> > > > > Maybe I'm totally missing your point, but shouldn't that just be, e.g. > > > > <% f.fields_for @shelf.items.each do |item| %> > > > <%= item.sku %> > > > ... > > > ?? > > > -- > > > Hassan Schroeder ------------------------ [email protected] > > > twitter: @hassan -- 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.

