2009/11/9 Heinz Strunk <[email protected]>: > > Colin Law wrote: >> 2009/11/9 Heinz Strunk <[email protected]>: >>> >>> No no no, you understood me wrong. It's just a form where you can add >>> users to the object that is being created. It's a form, you click on add >>> user you go to another page, add as many users as you want, go back to >>> the main form. >>> I need to know how many users have been added, which ones and if the >>> maximum is reached. >>> >>> Is it more clear now? >> >> Yes, in that case I would use the session, if you are really sure you >> can't just update the db as you go along. What is the issue with just >> updating the db as you go? The user will get really hacked off if he >> spends half an hour entering multiple forms only to lose it all when >> he loses connection for some reason. >> >> Colin > > Well, good point but I'm not sure if I unerstood what you exactly mean > by update db as you go. The group and it's users (which are being added > in the sub form) have a m:n-relation so you'd create that relaion for > each and every user being added and delete it again if something goes > wrong or the user hits the cancel button? Looks like a lot of > unnecessary db traffic to me. Or would you create another table only for > the temp data?
I do not know enough about the application to say much more. I was suggesting updating the actual data rather than a temp table, but it was only a suggestion. I generally would suggest to do things the easiest way initially and only complicate it it if becomes necessary, though which is the easy way in your case I do not know. Certainly don't worry about the db traffic unless it becomes an issue. Whichever route you go down make sure you have tests in place so you can refactor later and know it still works. Colin --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

