Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails link_to with inline styling

I must change a link_to tag color without using a CSS class, how can I do? I've tried something such as

<%= link_to item.description, {}, {:style=>'color:#FFFFFF;', :class => "css_class"} %> 

but it doesn't works on ruby 1.9.2 and rails 3.1

like image 542
Marco Avatar asked Mar 19 '12 10:03

Marco


1 Answers

How about

<%= link_to item.description, nil, {:style=>'color:#FFFFFF;', :class => "css_class"} %> 

...or...

<%= link_to item.description, '#', {:style=>'color:#FFFFFF;', :class => "css_class"} %> 
like image 164
ksol Avatar answered Sep 27 '22 01:09

ksol