diff options
author | Matthew Landauer <matthew@openaustralia.org> | 2013-03-25 16:28:14 +1100 |
---|---|---|
committer | Matthew Landauer <matthew@openaustralia.org> | 2013-03-25 16:28:14 +1100 |
commit | 9727c7b62fd3fe7b00cfc64cb4b36ba445a3a960 (patch) | |
tree | bb6faa702acc2a57e67bea4597a74ab1fa799eba /app/controllers/application_controller.rb | |
parent | 7330ad14103642fb8c13707fe4ce61f67ab649cf (diff) |
Tiny refactor
Diffstat (limited to 'app/controllers/application_controller.rb')
-rw-r--r-- | app/controllers/application_controller.rb | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 4f3624ab7..a2951bb42 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -373,11 +373,8 @@ class ApplicationController < ActionController::Base # Peform the search @per_page = per_page - if this_page.nil? - @page = get_search_page_from_params - else - @page = this_page - end + @page = this_page || get_search_page_from_params + result = ActsAsXapian::Search.new(models, @query, :offset => (@page - 1) * @per_page, :limit => @per_page, |