Castle and Riders

Secrets of Links in Rails

Rails provides a handy method for creating a link in your views:

link_to "Home Page", "http://gridworlds.com"
=>  <a href="http://gridworlds.com">Home Page</a>

Of course, if this were all the link_to() method did, there would be little reason to use it instead of just typing the HTML directly.

Posted on August 24th, 2008 in the Rails category | Permalink | No Comments »



You are currently browsing the GridWorlds weblog archives for August, 2008.

Categories

Archives