diff options
author | Seb Bacon <seb.bacon@gmail.com> | 2011-08-26 09:48:01 +0100 |
---|---|---|
committer | Seb Bacon <seb.bacon@gmail.com> | 2011-08-29 09:44:33 +0100 |
commit | 5f0c0d59ded4301efa085c4103b84a42a9fa61f6 (patch) | |
tree | f759c7d7fee8a7004b5d94b5144d37fe512534cf /app/models/track_thing.rb | |
parent | d5384ba1b739c7ca3a8fcab4cdda35965d33c6ee (diff) |
Further work in progress on better search functionality
Diffstat (limited to 'app/models/track_thing.rb')
-rw-r--r-- | app/models/track_thing.rb | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/app/models/track_thing.rb b/app/models/track_thing.rb index f993b4fe8..1cd957549 100644 --- a/app/models/track_thing.rb +++ b/app/models/track_thing.rb @@ -105,9 +105,19 @@ class TrackThing < ActiveRecord::Base return track_thing end - def TrackThing.create_track_for_search_query(query) + def TrackThing.create_track_for_search_query(query, variety_postfix = nil) track_thing = TrackThing.new track_thing.track_type = 'search_query' + if !(query =~ /variety:/) + case variety_postfix + when "requests" + query += " variety:sent" + when "users" + query += " variety:user" + when "authorities" + query += " variety:authority" + end + end track_thing.track_query = query return track_thing end |