Sha256: e880be1c517e7dbd40175402164731200b5973626eb1cefdb726f6a66548579a

Contents?: true

Size: 389 Bytes

Versions: 6

Compression:

Stored size: 389 Bytes

Contents

module Locomotive
  class SearchController < ::Locomotive::BaseController

    skip_load_and_authorize_resource

    respond_to :json

    def index
      results = self.search_service.from_backoffice(current_site, params[:query])
      respond_with(results: results)
    end

    protected

    def search_service
      @search_service ||= Locomotive::SearchService.new
    end

  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
locomotivecms-search-0.3.6 app/controllers/locomotive/search_controller.rb
locomotivecms-search-0.3.5 app/controllers/locomotive/search_controller.rb
locomotivecms-search-0.3.4 app/controllers/locomotive/search_controller.rb
locomotivecms-search-0.3.3 app/controllers/locomotive/search_controller.rb
locomotivecms-search-0.3.2 app/controllers/locomotive/search_controller.rb
locomotivecms-search-0.3.0 app/controllers/locomotive/search_controller.rb