forked from bofh/fetsite
AutoCommit Don Jun 11 11:03:02 CEST 2015
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
<% unless search_results.nil? %>
|
||||
<ul>
|
||||
<% search_results.hits.each do |hit| %>
|
||||
<li>
|
||||
<% search_results.each_hit_with_result do |hit,result| %>
|
||||
<li> <%= result.name %>
|
||||
<% hit.highlights(:name).each do |hlgt| %>
|
||||
<%=puts hlgt.format {|word|} "<b>#{word}</b>" %>
|
||||
<%= hlgt.format{|word|"<b>#{word}</b>" } %>
|
||||
<% end %>
|
||||
<% hit.highlights(:text).each do |hlgt| %>
|
||||
<%=%> puts hlgt.format {|word|} "<b>#{word}</b>" %>
|
||||
<%= "text:" + raw(hlgt.format {|word| "*#{word}*" })%>
|
||||
<% end %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user