Forum: Ruby on Rails design question - multiple form resubmit problem.

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
036be8d5d83a98e546b98d64e3fd6c20?d=identicon&s=25 Sam Donaldson (Guest)
on 2006-05-08 00:41
(Received via mailing list)
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.
D5145c421cd25af6fa577c15219add90?d=identicon&s=25 unknown (Guest)
on 2006-05-08 02:24
(Received via mailing list)
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
This topic is locked and can not be replied to.