diff options
author | Henare Degan <henare.degan@gmail.com> | 2012-10-18 18:18:21 +1100 |
---|---|---|
committer | Henare Degan <henare.degan@gmail.com> | 2012-10-18 18:39:02 +1100 |
commit | 9736e3ad0be4a64d6f6dd1d5c96d236dc1ac1b4b (patch) | |
tree | 0f2351652c4609d3e14c7512d5ae29aa90898d0d /app/models | |
parent | 0e7263201e58f00201e25e85ff2aa477f5521d30 (diff) |
Fix description of a search
Used to say "comments or requests which are " when you did: View requests > All requests > Follow
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/track_thing.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/models/track_thing.rb b/app/models/track_thing.rb index d1cef4d4d..2a61eb858 100644 --- a/app/models/track_thing.rb +++ b/app/models/track_thing.rb @@ -107,7 +107,12 @@ class TrackThing < ActiveRecord::Base end descriptions = [] if varieties.include? _("requests") - descriptions << _("requests which are {{list_of_statuses}}", :list_of_statuses => Array(statuses).sort.join(_(' or '))) + if statuses.empty? + # HACK: Relies on the 'descriptions.sort' below to luckily put this first + descriptions << _("all requests") + else + descriptions << _("requests which are {{list_of_statuses}}", :list_of_statuses => Array(statuses).sort.join(_(' or '))) + end varieties -= [_("requests")] end if descriptions.empty? and varieties.empty? |