Name and class href attribute in a link_to_remote

I have a link to remote and I’m trying to get the name="" and the
class="" attribute in the href so the link will come out like this:

<a href=“action” onclick"ajax(action)" name=“Title Of Link”
class=“someclass”>

So far the link looks like this:

<% for course in @courses %>
<%= link_to_remote “#{course.title}”,
{:url => {:action => “add_to_cart”, :id => course},
:complete => visual_effect(:highlight, “schedule”, :duration =>
1.5)},
{:href => url_for(:action => :add_to_cart, :id => course )} %>
<% end %>

Thanks.

<%= link_to_remote “#{course.title}”,
{:url => {:action => “add_to_cart”, :id => course},
:complete => visual_effect(:highlight, “schedule”, :duration =>
1.5)},
{:href => url_for(:action => :add_to_cart, :id => course )} %>

<%= link_to_remote “#{course.title}”, {:url => {:action =>
“add_to_cart”, :id => course}, :complete => visual_effect(:highlight,
“schedule”, :duration =>
1.5)}, :class => “someClass”, :name => “Title Of Link”%>

?

David C. wrote:

<%= link_to_remote “#{course.title}”, {:url => {:action =>
“add_to_cart”, :id => course}, :complete => visual_effect(:highlight,
“schedule”, :duration =>
1.5)}, :class => “someClass”, :name => “Title Of Link”%>

?

Yeah, tried that, and it would normally work but the weird thing is with
the:

{:href => url_for(:action => :add_to_cart, :id => course" )}

part of the link everything gets screwed up.

Usually the class gets appended to the href like this
href="/action/?class=“someClass” which does me no good.

no matter where I put the :class and :name when :href is present, I get
some sort of error