Forum: Ruby on Rails Test ftp connection from web form

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.
Brian Z. (Guest)
on 2009-04-22 20:37
Hello,

I'm trying to figure out the best method to test an ftp connection from
a web form.

For example,

There is a web form with fields for ftp_host, ftp_username,
ftp_password. I created a controller action 'ftp_connection_test' where
I grab the current users saved ftp information, try to connect, run a
directory listing command and return the success or error message in
flash. This seems to be working fine on my 'user settings' pages.

What I'm trying to figure out how to do is:

Run this same action on a sign-up form to test the ftp connection before
the fields actually get saved.

Would it be best to do this with RJS? It would be neat if I could
automatically run the ftp connection test once all the ftp fields are
filled out.

Thanks for any suggestions
This topic is locked and can not be replied to.