Class: Perron::SearchesController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/perron/searches_controller.rb

Instance Method Summary collapse

Instance Method Details

#showObject



7
8
9
10
11
12
13
14
# File 'app/controllers/perron/searches_controller.rb', line 7

def show
  resources = search_scope.flat_map(&:all)
  index = resources.map do |resource|
    base_fields(resource).merge(additional_search_fields(resource))
  end

  render json: index
end