Sha256: 0b00352763de002859779ced7b420d1bb9c7194294434f753ccacbb728e06dfb

Contents?: true

Size: 382 Bytes

Versions: 11

Compression:

Stored size: 382 Bytes

Contents

module Locomotive
  class SearchForResourcesController < BaseController

    account_required & within_site

    respond_to :json, only: [:index]

    def index
      resources = service.find_resources(params[:type], params[:q], params[:scope])
      respond_with resources
    end

    private

    def service
      @service ||= EditorService.new(current_site)
    end

  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
locomotivecms-4.2.0.alpha2 app/controllers/locomotive/search_for_resources_controller.rb
locomotivecms-4.2.0.alpha1 app/controllers/locomotive/search_for_resources_controller.rb
locomotivecms-4.1.1 app/controllers/locomotive/search_for_resources_controller.rb
locomotivecms-4.1.0 app/controllers/locomotive/search_for_resources_controller.rb
locomotivecms-4.1.0.rc1 app/controllers/locomotive/search_for_resources_controller.rb
locomotivecms-4.0.3 app/controllers/locomotive/search_for_resources_controller.rb
locomotivecms-4.0.2 app/controllers/locomotive/search_for_resources_controller.rb
locomotivecms-4.0.1 app/controllers/locomotive/search_for_resources_controller.rb
locomotivecms-4.0.0 app/controllers/locomotive/search_for_resources_controller.rb
locomotivecms-4.0.0.rc0 app/controllers/locomotive/search_for_resources_controller.rb
locomotivecms-4.0.0.alpha3 app/controllers/locomotive/search_for_resources_controller.rb