Hassan Schroeder wrote in post #962339: > On Thu, Nov 18, 2010 at 12:58 AM, Norbert Melzer > But suppose the user clicks submit, instantly recognizes an error in > the information, hits stop, corrects the error, and clicks submit again? > > If you discard the *second* submission, there is now a discrepancy > between what the user intended and what you've stored. Uh-oh.
Besides fixing the double-submission problem in the view layer you might also want to add appropriate unique indexes to prevent the possibility of duplicates at the database level. Doing so will at lease ensure data integrity and prevent insert race conditions. -- 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 [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.

