how do you get a link_to to generate something like
<a class="myclass".....
this is my code
<%= link_to "link", :controller => :my_controller, :action => :index, :class=>("on" if request.path =~ /\/my_controller/ ) %>
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you read the API, you’ll see the following example:
This means the syntax for link_to is “link to something, then something else in braces, then another thing in braces.” Another way of interpreting it is that the chunks have to be hashes.
Which can all be placed on one line if you like.