mirror of
https://github.com/CodeforLeipzig/stadtratmonitor.git
synced 2024-10-18 23:54:37 +02:00
12 lines
473 B
Ruby
12 lines
473 B
Ruby
class SearchController < ApplicationController
|
|
def index
|
|
@paper_type = params[:paper_type]
|
|
@originator = params[:originator]
|
|
options = params.slice(:paper_type, :originator)
|
|
|
|
@response = Paper.search(params[:q], options)
|
|
@papers = @response.page(params[:page]).results
|
|
@paper_type_facets = @response.response['aggregations']['paper_types']['buckets']
|
|
@originator_facets = @response.response['aggregations']['originators']['buckets']
|
|
end
|
|
end
|