diff options
author | Seb Bacon <seb.bacon@gmail.com> | 2011-08-22 14:11:02 +0100 |
---|---|---|
committer | Seb Bacon <seb.bacon@gmail.com> | 2011-08-22 14:19:05 +0100 |
commit | 5c3881bfacdb34a605ddfbadf1531d0e341d7beb (patch) | |
tree | 088e752d1a6d2fb38d1409dbfb1cb332af92594c /app/models/info_request_event.rb | |
parent | 15a174375e638b91c138d771d4851613110f9cdc (diff) | |
parent | a29b3aaf0ae77af49d38813b62dddcb6889c1ebe (diff) |
merge from master and make tests pass
Diffstat (limited to 'app/models/info_request_event.rb')
-rw-r--r-- | app/models/info_request_event.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/models/info_request_event.rb b/app/models/info_request_event.rb index 02b9a34ac..d79647c98 100644 --- a/app/models/info_request_event.rb +++ b/app/models/info_request_event.rb @@ -121,7 +121,12 @@ class InfoRequestEvent < ActiveRecord::Base self.info_request.user.url_name end def requested_from - self.info_request.public_body.url_name + # acts_as_xapian will detect translated fields via Globalize and add all the + # available locales to the index. But 'requested_from' is not translated directly, + # although it relies on a translated field in PublicBody. Hence, we need to + # manually add all the localized values to the index (Xapian can handle a list + # of values in a term, btw) + self.info_request.public_body.translations.map {|t| t.url_name} end def commented_by if self.event_type == 'comment' |