I’m trying to create links that have classes using link_to. The only
problem is I can’t figure out the syntax from the Rails API. It says
this:
link_to(name, options = {}, html_options = nil,
*parameters_for_method_reference)
But I know that’s not what you really need to type in because I tried:
<%= link_to “Downloads”, :controller => ‘downloads’,
html_options={class=“here”} -%>
and got an error. I even tried putting a colon in front of html_options
to make it look like a symbol like the rest of them. No dice.
I’m pretty sure this just comes back to a fundamental inability to read
the api correctly. I’ve been doing this for a year but I still don’t
know what “options = {}” translates into, for example. Obviously it
isn’t meant to be typed in as it is.
Can anybody explain this for me?
Thanks!