aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/application_controller.rb
diff options
context:
space:
mode:
authorSeb Bacon <seb.bacon@gmail.com>2012-02-02 12:30:36 +0000
committerSeb Bacon <seb.bacon@gmail.com>2012-02-02 12:30:36 +0000
commit53d249b2c500dae07e934c0009d0813181092702 (patch)
tree7797047ccfa54e5ac05fb8689821ab80694dd225 /app/controllers/application_controller.rb
parentcd77da0c7ea166b8cdd9ecc5a8d2055515027ad8 (diff)
parent2eac4bef8d73f47bbe579b6f787ef54b8d782d7a (diff)
Merge branch 'release/0.5' of github.com:sebbacon/alaveteli into release/0.5
Diffstat (limited to 'app/controllers/application_controller.rb')
-rw-r--r--app/controllers/application_controller.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index 1849f23f3..b681f455d 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -363,7 +363,10 @@ class ApplicationController < ActionController::Base
else
@page = this_page
end
- return InfoRequest.full_search(models, @query, order, ascending, collapse, @per_page, @page)
+ result = InfoRequest.full_search(models, @query, order, ascending, collapse, @per_page, @page)
+ result.results # Touch the results to load them, otherwise accessing them from the view
+ # might fail later if the database has subsequently been reopened.
+ return result
end
def get_search_page_from_params
return (params[:page] || "1").to_i