aboutsummaryrefslogtreecommitdiffstats
path: root/app/models
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2012-10-25 17:18:49 +0100
committerLouise Crow <louise.crow@gmail.com>2012-10-25 17:18:49 +0100
commit46c160d3b7b121ccda404c56e2cc54f48b16703d (patch)
tree94cc8a80d303022d51d200117c7a3d081ee1f411 /app/models
parentb45be1d0523e488998434603923585989e27ce1d (diff)
parent6e5656ba88210300aa0c1223dc459199b7fa4c33 (diff)
Merge remote-tracking branch 'openaustralia_github/follow-all-requests-description' into develop
Diffstat (limited to 'app/models')
-rw-r--r--app/models/track_thing.rb7
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?