If you are updating any state or flag on first submit; you can possibly
generate an exception if that flag is already set and second submit tries to
set it again. Then you can catch it (rescue) and ignore or display the
error/message accordingly.
Hope it helps.
Thanks,
Abhinav
--
अभिनव
http://twi
Shoot users that do this - it's the only way to be sure. :)
--Matt Jones
On Sep 5, 12:50 pm, Frederick Cheung
wrote:
> On Sep 5, 12:30 pm, Hunt Jon wrote:
>
> > Hi,
>
> > We occasionally have a user pressing "submit" button more than once.
> > I know I can disable submit button using "onclick"
On Sep 5, 12:30 pm, Hunt Jon wrote:
> Hi,
>
> We occasionally have a user pressing "submit" button more than once.
> I know I can disable submit button using "onclick".
>
> But I sometimes need a more solid solution especially
> for a form that could change a record inside the database.
>
Opti
If I'm following you correctly, check out the RailsSpace book site.
You can download the final application. In the application, look at
the comments conroller in the create action. He's checking for
duplicates and throwing them out if so.
http://www.railsspace.com/
I hope that's what you meant
4 matches
Mail list logo