Sam Donaldson
2006-May-07 22:39 UTC
[Rails] design question - multiple form resubmit problem.
Hello, My question has to do with a form resubmit problem. Say for example a form is submitted and within that form, a picture is uploaded. If the user presses the Back buttom and gets back to the form submission sheet, and then clicks on resubmit, once again, the same data is populated into my tables wasting space (another picture upload for no reason in a separate row). Now, I know there are multiple ways of solving this issue, but where''s the best place to take care of this problem (e.g. just check in my action, or somewhere in the model?). Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060507/91c15f85/attachment-0001.html
njmacinnes@gmail.com
2006-May-08 00:21 UTC
[Rails] design question - multiple form resubmit problem.
Well here''s what I would do, although I''ve never dealt with this problem before so there could be far better ways, which I''m sure a more experienced user will suggest. Don''t allow any one session to upload a two images with the same filename and filesize. Hope this helps. -N On 07/05/06, Sam Donaldson <samonderous@gmail.com> wrote:> > Hello, > > My question has to do with a form resubmit problem. Say for example a form > is submitted and within that form, a picture is uploaded. If the user > presses the Back buttom and gets back to the form submission sheet, and then > clicks on resubmit, once again, the same data is populated into my tables > wasting space (another picture upload for no reason in a separate row). > Now, I know there are multiple ways of solving this issue, but where''s the > best place to take care of this problem ( e.g. just check in my action, or > somewhere in the model?). > > Thanks. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >