[Rails] Re: Custom Form Buttons

James Whittaker
Wed, 19 Apr 2006 09:40:01 -0000

Arch Stanton wrote:
> Is there a way to deliver options for a custom form button to the submit
> function?
>
> As in:
>
> <input type="image" name="submit"
src="image.jpg" width="126"
> height="18">

Best advice is to read the RDoc that comes with rails. It has lots of
examples and is very easy to read. In case you do not know how to run
it. Bring up your command prompt and enter:

gem_server

This will start a webrick server session, now point your web browser to
http://0.0.0.0:8808 (or http://localhost:8808) this will now be shoing
the RDoc for the gems you have on your system. If you look into the
latest version of the actionpack (that contains the actionview) you will
see a list of methods on the right.

The bit you are interested in is here:
http://localhost:8808/doc_root/actionpack-1.12.0/rdoc/classes/ActionView/Helpers/UrlHelper.html#M001065

Hope this helps.

By looking and understanding the RDocs you can save yourself some time
and learn more about the way rails works.

I''m no expert but it has really helped me.

enjoy the rails...