Search query and display selection kept across pages and searches
This commit is contained in:
parent
dead80eb5e
commit
8e9ff1ef80
3 changed files with 38 additions and 25 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue