Replace Twitter Bootstrap by Zurb Foundation Used @import in SCSS instad of require_tree for proper order and use of variables like $debian_color Moved old files out of the way (renamed them to xx*) Welcome controller (/) works Moved templates from ERB to SLIM format Fixed database settings Reduced routes to working ones Tidied up Gemfile Checked in experimental lab files Tried to find a good description for this massive commit :)
30 lines
629 B
Ruby
30 lines
629 B
Ruby
class PackagesController < ApplicationController
|
|
def index
|
|
@packages = Package.includes(:screenshots)
|
|
|
|
if params[:query]
|
|
@packages = @packages.text_search(params[:query])
|
|
end
|
|
|
|
# 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
|
|
|
|
@packages = @packages.page(params[:page]).per(12)
|
|
end
|
|
|
|
def details
|
|
@package = Package.find_by(name: params[:name])
|
|
end
|
|
|
|
def with_screenshots
|
|
end
|
|
|
|
def without_screenshots
|
|
end
|
|
|
|
def moderate
|
|
end
|
|
end
|