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", "Ruby on Rails — A web-app framework that includes everything needed to create database-backed web applications according to the Model-View-Controller (MVC) pattern.; -%></b>

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

See: ActionView::Helpers::UrlHelper for how link_to works, or do a search for more detail about the RoR URL Helpers.

Cheers Mohit.