class DownloadsController < ApplicationController
  def index
    puts "query_params:#{query_params.inspect}"
    @page, @downloads = pagy Download.where(query_params).most_recent_first
  end

  def show
  end

  private
  def query_params
    if params[:platform].blank?
      params[:platform] = "openwrt"
    end
    params.permit(:platform)
  end

end
