link_to_remote style

I am trying to use link_to_remote to update a div tag with some
content. This part works fine. The thing I am having an issue with
is that I am trying to format this link with a 'class' tag and it is
being ignored. Can anyone shed some light on this? I have tried
brackets in different places with different options and tried other
variations with no luck. I am guessing my brackets are wrong but
every time I move them my app breaks. Thanks in advance

here is the snippet of code i am using:
<%= link_to_remote(foo.title,
:update =>"show_me",
:url => {:action => "show",
:class => "foo_style") %>

I think you’ll need to use two hashes, like so:

<%= link_to_remote foo.title,

{ :update =>“show_me”, :url => {:action => “show”, :id=>} },

{ :class => “foo_style” } %>


Yeah the two hashes did the trick, thanks.

And because of Ruby syntactic sugar, you can omit the braces from the
last hash (only), so this is equivalent:

  <%= link_to_remote foo.title,
    { :update =>"show_me", :url => {:action => "show", :id=>} },
    :class => "foo_style" %>