You can pass a block to `#link_to`. An example from the docs:
<%= link_to(@profile) do %>
<strong><%= @profile.name %></strong> -- <span>Check it out!</span>
<% end %>
# => <a href="/profiles/1">
<strong>David</strong> -- <span>Check it out!</span>
</a>
See
http://api.rubyonrails.org/classes/ActionView/Helpers/UrlHelper.html#method-i-link_to
--
Greg Navis
I help tech companies to scale Heroku-hosted Rails apps.
Free, biweekly scalability newsletter for SaaS CEOs
<http://www.gregnavis.com/newsletter/>
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/rubyonrails-talk/CAA6WWt9kMapiQ5F1HwPZXhywY5MaoTi-beZx__hM0d48th%2BJOQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.