I am using a helper method to generate my search result listings:
def search_result_name(result)
case result
when Term
“
#{result.title}
Filed under: Terms”
when Article
“
#{result.title}
Filed under: Articles”
else
result.to_s
end
end
This works perfectly, but I hit a wall when I try to include a link
in the above method. I try using a link_to helper inside a string
interpolation block but Rails does not parse the helper.
Any ideas?