I’m looking at some of these form helpers in the API and see where you
put html options in, however I don’t see any examples. I know this is
probably a lame question but can anyone point me to some examples.
How the options are written out perhaps ?
Here ‘class’ is the HTML attribute you’re wanting to assign to the A
tag.
That attribute will never see the light of day however. Ruby has some
great
time saving shortcuts, but if you don’t know they’re there they can also
cause you problems.
Ruby assumes all the arguments after “Here” are all one hash, you need
to
let Ruby that isn’t case so that it’ll take notice of your class
attribute:
Actually, the link_to, button_to, and url_for I understood. I was
looking at “selects” and didn’t understand the HTML options part.
Perhaps I’m just confusing myself needlessly and they work the same.
Actually, the link_to, button_to, and url_for I understood. I was
looking at “selects” and didn’t understand the HTML options part.
Perhaps I’m just confusing myself needlessly and they work the same.
I think that’s a lack of adherence to naming conventions. (Or a lack
of naming conventions?)
It seems that the ‘options’ parameter to the check_box helper method
does what the ‘html_options’ parameter to the select helper method
does (and the select helper method has its own ‘options’ parameter).
Am I misreading it?
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.