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"> -- Posted via http://www.ruby-forum.com/.
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... -- Posted via http://www.ruby-forum.com/.
James Whittaker wrote:> 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...Ya I am using the docs. I find them confusing as it is hard to find what you want. For example I''ve been looking at the submit calls . . . I see now after looking at the UrlHelper page that I can pass in html options. However the problem is knowing which method you need to use. All the methods for form submission should be categorized as such on a single page. -- Posted via http://www.ruby-forum.com/.