Search query and display selection kept across pages and searches

This commit is contained in:
Christoph Haas 2013-11-17 01:07:27 +01:00
parent dead80eb5e
commit 8e9ff1ef80
3 changed files with 38 additions and 25 deletions

View file

@ -6,11 +6,11 @@ class PackagesController < ApplicationController
@packages = @packages.text_search(params[:query])
end
#if params[:with_screenshots]=='yes'
# # Limit the packages to those that have approved screenshots.
# # Also eager-load the screenshots.
# Limit the packages to those that have approved screenshots.
# Also eager-load the screenshots.
if params[:show]=='onlywith'
@packages = @packages.where("screenshots.approved"=>true)
#end
end
@packages = @packages.page(params[:page]).per(12)
end