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 %>
    <li class="searchResults row<%= cycle('Odd','Even') %>">
      <%= link_to faq.highlight(@query, :field => :question), faq
%><br />
      <%= faq.highlight(@query, :field => :answer) %>
    </li>
  <% 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
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to