aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/info_request_event.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/info_request_event.rb')
-rw-r--r--app/models/info_request_event.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/models/info_request_event.rb b/app/models/info_request_event.rb
index 4a659dc65..8ad2d5964 100644
--- a/app/models/info_request_event.rb
+++ b/app/models/info_request_event.rb
@@ -109,7 +109,8 @@ class InfoRequestEvent < ActiveRecord::Base
[ :commented_by, 'C', "commented_by" ],
[ :request, 'R', "request" ],
[ :variety, 'V', "variety" ],
- [ :filetype, 'T', "filetype" ]
+ [ :filetype, 'T', "filetype" ],
+ [ :tags, 'U', "tag" ]
],
:if => :indexed_by_search?,
:eager_load => [ :incoming_message, :outgoing_message, :comment, { :info_request => [ :user, :public_body, :censor_rules ] } ]
@@ -188,6 +189,10 @@ class InfoRequestEvent < ActiveRecord::Base
end
return ''
end
+ def tags
+ # this returns an array of strings, each gets indexed as separate term by acts_as_xapian
+ return self.info_request.tag_array_for_search
+ end
def indexed_by_search?
if ['sent', 'followup_sent', 'response', 'comment'].include?(self.event_type)
if !self.info_request.indexed_by_search?