views:

34

answers:

2

I am attempting to pass 2 classes to an element in a rails 3 application and having some issues with encoding.

 <td class="edit">
   <%= link_to 'Edit', edit_link_url(link, :class => 'edit_link ui') %><br />
   <%= link_to 'Delete', link_url(link, :class =>'delete_link ui'), :confirm => 'Are you sure?', :method => :delete %>
 </td>

can someone offer some insight on the best way to pass 2 classes to and element in RoR.

The current output in edit_link+ui

Thanks in advance.

+1  A: 

Remove them from the params of the link.

<%= link_to 'Edit', edit_link_url(link), :class => 'edit_link ui' %><br />
<%= link_to 'Delete', link_url(link), :class =>'delete_link ui', :confirm => 'Are you sure?', :method => :delete %>
theIV
Hooray! Worked like a charm. gracias.
jnolte
A: 

Looks like a brackets problem. The class should be applied to the link_to not the url helper.

Kevin Sylvestre