Just a small thing, but I needed to know how to do this and it took me a while to find. Hopefully this will help someone else out.
In HTML, we might declare a link like so
Now, in Ruby on Rails, we want to declare a link, so we use the built in link_to method like this
Hmmm… how do we squeeze a title in there? Luckily, the third parameter to link_to
is a hash of HTML options.
That should do it. I feel like I still have so much to learn about Ruby on Rails, but the more I learn the more I want to learn!
Need web application development, maintenance for your existing app, or a third party code review?
Velocity Labs can help.
Hire us!