aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/general_controller.rb
diff options
context:
space:
mode:
authorMatthew Landauer <matthew@openaustralia.org>2012-09-29 10:04:09 +1000
committerMatthew Landauer <matthew@openaustralia.org>2012-09-29 10:04:09 +1000
commit287c7f3944fb35ba939a74da368d6b8f973454aa (patch)
treea92a5495766978af8698f10be9b920e4d7f94864 /app/controllers/general_controller.rb
parentfe1ddf9c737bb9051d8ccab2af6b81f607fe877d (diff)
When the list of requests on the frontpage is being filled out with not just successful
requests make the text and the link reflect that
Diffstat (limited to 'app/controllers/general_controller.rb')
-rw-r--r--app/controllers/general_controller.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/controllers/general_controller.rb b/app/controllers/general_controller.rb
index 5a7b006a0..dc8e03d7a 100644
--- a/app/controllers/general_controller.rb
+++ b/app/controllers/general_controller.rb
@@ -55,10 +55,13 @@ class GeneralController < ApplicationController
# If there are not yet enough successful requests, fill out the list with
# other requests
if @request_events.count < max_count
+ @request_events_all_successful = false
query = 'variety:sent'
xapian_object = perform_search([InfoRequestEvent], query, sortby, 'request_title_collapse', max_count-@request_events.count)
more_events = xapian_object.results.map { |r| r[:model] }
@request_events += more_events
+ else
+ @request_events_all_successful = true
end
rescue
@request_events = []