Here's the string I want:
<a href="/pugs/1-baxter">Baxter</a> and <a href="/pugs/2-sofia">Sofia</a>
Here's the code I'm using to output that:
<%= @pugs.collect {|p| link_to(p.name, pug_path(p))}.to_sentence %>
Unfortunately the output is getting encoded:
<a href="/pugs/1-baxter">Baxter</a> and <a href="/pugs/2-sofia">Sofia</a>
I've tried using html_safe
and raw
, but they don't seem to have any affect.