On Wed, Feb 9, 2011 at 6:10 PM, Kunjan Batavia <li...@ruby-forum.com> wrote:

> Hi,
> I am new to Ruby.
> I want to develop one page with multiple child records associated with
> master record.
>
> So basic idea is to have one contact dropdown and add multiple contacts
> in session.
>
> After saving contact is session, display added contact records in the
> same page with remove link. Up to this data is managed in session only.
>
> After click on final save button, master record will be saved and all
> the contact records of session also needs to be saved.
>
> Can anyone guide me how to develop this kind of scenario.
>
> Try accepts_nested_attributes_for.
Apart from this, why do you want to use sessions for this. The way I am
looking at your application, you are actually saving the user's preferences/
changes in the session for some time and then doing a DB update when  the
user clicks on Save button. Why not store the user preferences in a
javascript object. I might be mistaken, but in my opinion I would never go
for storing something in sessions, because unless you are encrypting them,
they are vulnerable and there are many issues involved. Correct me if I am
wrong.

> Thanks in advance.
>
> --
> Posted via http://www.ruby-forum.com/.
>
> --
> 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 rubyonrails-talk@googlegroups.com.
> To unsubscribe from this group, send email to
> rubyonrails-talk+unsubscr...@googlegroups.com.
> 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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to