Instead of writing out the anchor tag, you could use the rails  `link_to` helper.