Hi All,
I am running ferret as my search engine against a table that contains
two text fields that contain textile formatting using the RedCloth
gem. I’ve added the fields in to the model as below:
acts_as_ferret :fields => {
:question => {:store => :yes},
:answer => {:store => :yes}
}
and in my search controller i use:
@faqs = Faq.find_with_ferret(@query)
In my view I have:
<% for faq in @faqs %>
<%= link_to faq.highlight(@query, :field => :question), faq
%>
<%= faq.highlight(@query, :field => :answer) %>
<% end %>
This works, but it displays the information without converting the
textile format to the correct HTML, eg bold, lists, etc (but the
search term is highlighted). Any pointers on how to use the ferret
highlighting and textile together?
Many Thanks,
Steve