Need to add XTHML class attribute, link_to's html options?

I need to add a class attribute to the elements generated by link_to
for my CSS to style the links.
How can I do that?

<%= link_to “Artworks”, :controller => “artwork”, :action => “list” %>

dangerwillrobinsondanger wrote:

I need to add a class attribute to the elements generated by link_to
for my CSS to style the links.
How can I do that?

<%= link_to “Artworks”, :controller => “artwork”, :action => “list” %>

<%= link_to ‘My Homepage’, get_home_page.last, :class => ‘navlink3’ %>


Phlip
Test Driven Ajax (on Rails) [Book]
“Test Driven Ajax (on Rails)”
assert_xpath, assert_javascript, & assert_ajax

Thanks, but that approach using this:

<%= link_to “Artworks”, :controller => “artwork”, :action =>
“list”, :class => “artwork” %>

…generates this:

Artworks

That definitely renders, but renders something different from what I
need.
I need to generate this:
Artworks

Aha!! I got it!

<%= link_to “Artworks”, :controller => “artwork”, :action =>
“list”, :class => “artwork” %>

needs to be:

<%= link_to “Artworks”, {:controller => “artwork”, :action =>
“list”}, :class => “artwork” %>

Voila!