Colin Law wrote in post #1085205: > On 19 November 2012 17:23, mongeta 99 <li...@ruby-forum.com> wrote: >> is for a very complex ERP. >> >> We don't want to store 'invalid data' in the real tables, like using >> some attribute like 'pending' or 'modifying'. >> >> One solution that I'm experiment with it, and it seems it can serve us, >> is using schemas of PostgreSQL. I have defined in a new schema the same >> tables that we need for this purpose. > > Is there too much data to hold it all in the session till it is ready to > go?
it depends ... 1 main model with more or less 4 nested models and each of this 4 models 5 more ... > Whatever route is there a problem with the possibility of one of the > tables getting updated by another user whilst this user is collecting > the data, then if his data is put in the database (whether inside a > transaction or not) the data collected in the session or your schema > table would remove the changes already made. This can only happen when modifying, not when creating. And I think I can control more or less with database-semaphores in some way attached to sessions. The main problem here is code duplication, if I store the data into session, I have to decollect and update in some way the session data and the views, so some views will be updated from data from session or from database ... thanks, -- 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 https://groups.google.com/groups/opt_out.