From 095efc46d2a029b4a72a25c0998adc09f8284e5f Mon Sep 17 00:00:00 2001 From: Francis Irving Date: Wed, 20 Oct 2010 15:46:24 +0100 Subject: Include snippet in results from search query JSON. --- app/controllers/track_controller.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/controllers/track_controller.rb') diff --git a/app/controllers/track_controller.rb b/app/controllers/track_controller.rb index f24994276..72ee13f98 100644 --- a/app/controllers/track_controller.rb +++ b/app/controllers/track_controller.rb @@ -142,6 +142,8 @@ class TrackController < ApplicationController :incoming_message_id => r[:model].incoming_message_id, :outgoing_message_id => r[:model].outgoing_message_id, :comment_id => r[:model].comment_id, + + :snippet => @template.highlight_and_excerpt(r[:model].search_text_main(true), @xapian_object.words_to_highlight, 150) # XXX would be nice to add links here, but alas the # code to make them is in views only. See views/request/details.rhtml } -- cgit v1.2.3