link_to

Did you look at the generated html? All that your code does is create an
tag. So, this should work:

<%= link_to "Home", :controller => 'home', :action => 'index' %>

to boldface.

mike-311 wrote:

Raj wrote:

How do I change the color?

Steve Ross wrote:
  

Did you look at the generated html? All that your code does is create an
tag. So, this should work:

<%= link_to "Home", :controller => 'home', :action => 'index' %>

to boldface.

link_to will only generate the link - the rest is up to you:
1. stick formatting around it
2. make it of a particular style

Assuming you understand HTML, you should be able to extrapolate from this example:
<b><%= link_to "Visit Other Site", "http://www.rubyonrails.org/" -%></b>

Put this in your code and see what it generates. Hope that helps you get started.

See: http://api.rubyonrails.org/classes/ActionView/Helpers/UrlHelper.html#M000485 for how link_to works, or do a search for more detail about the RoR URL Helpers.

Cheers
Mohit.