oh i see, you can handle the way the hash is passed so that you can loop true the params and check for the selected one, then only save the selected ones , i did something similar. You can handle the hash by adding [] to the field names in the for helper. for example addin :value[whatever][] associates the items and puts then in an array in the params hash
On Wed, Sep 15, 2010 at 3:19 AM, gamov <[email protected]> wrote: > Yeah, it's quite similar, but the example uses the _destroy facility, > I want the opposite... > Anyway, I'm using a virtual attribute in the meantime... > > On Sep 9, 7:07 pm, radhames brito <[email protected]> wrote: > > i think i saw something similar here > > > > http://railscasts.com/episodes/196-nested-model-form-part-1 > > > > http://railscasts.com/episodes/197-nested-model-form-part-2 > > > > it has ajax and eveything > > > > On Thu, Sep 9, 2010 at 12:38 AM, gamov <[email protected]> wrote: > > > Cool, radhames brito. > > > > > I have a list of items (all are new_record? = true) that are nested > > > into another new record. I want the user to make a selection and ADD > > > them with checkboxes, not remove. Those without checkboxes will just > > > be discarded and never created. > > > > > On Sep 8, 11:07 pm, radhames brito <[email protected]> wrote: > > > > sure is simple, i will tell you what i think you are trying to say > and > > > you > > > > can confirm it, > > > > you have a list of items, and you want the user to be able to make a > > > > selection and remove them with checkboxes? > > > > is that it? > > > > > -- > > > 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]<rubyonrails-talk%[email protected]> > <rubyonrails-talk%[email protected]<rubyonrails-talk%[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]<rubyonrails-talk%[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.

