Forum: Ruby on Rails confirming (via javascript) before save

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.
94a7a55f37d81f6b3055ae60bd81790f?d=identicon&s=25 Felipe Gallois (Guest)
on 2009-01-11 15:07
(Received via mailing list)
Hello all,

I have the following scenario.
The user will input a name for the student to be added, since you can
have
duplicate names, the user will be the one in charge of checking if he is
not
adding the same student two times.
There are other fields that can be used in order to check it, but it has
to
be done manually.

The point is, when the user clicks on the submit button, I want to check
if
a user with the same name already exists and, if so, prompt a confirm
window
(javascript) to the user, so that he makes sure of what he is doing.

What is the best way to do it? Inside the create method of the
controller?

Thank youvery much

cheers!

--
gallois
aka Felipe Gallois
blog: www.gallois.com.br/blog
fanglib homepage: www.gallois.com.br/fanglib
This topic is locked and can not be replied to.