On Thu, Nov 18, 2010 at 12:58 AM, Norbert Melzer <[email protected]> wrote:
>> I have a form, When i click submit button twice, >> My form gets submitted twice, and 2 entries are saved. >> >> But I need only 1 entry to be saved. > Hidden field wich unique ID. If the ID is submitted twice, omit the new > entry 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. Might want to give that a little more thought :-) -- Hassan Schroeder ------------------------ [email protected] twitter: @hassan -- 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.

