Hi,
I’m having a bit of a struggle with link_to_remote. Everything works
exactly as I want it, but the problem is that I want to add another
attribute to the -tag, namely class="". Long story short, I want
specific links to look differently from others, but all of them being
link_to_function. Normally, I’d do this with adding a class=“foo” to
certain links and specifying the look with css, but I’m unsure how to do
this with Rails.
Currently, I have:
<%= link_to_remote(“foo”,
:update => ‘some-id’,
:url => { :action => :someaction, :params => { :parameter =>
“value” }},
:loading => “Element.hide(‘some-id’)”,
:complete => visual_effect(:appear, ‘some-id’)) %>
which generates
, just as it should. Basically, I wish to extend this to:
, but have no idea how to add the class-attribute. I’m guessing this
might be related to html_options = {} in the link_to_function method,
but documentation is non-existant.
Of course, I could work around this by using:
and then use
.class a{ stuff; }
in my css, but I don’t want to do that if I can help it.
Is there a way?
Thanks in advance,
Sebastian