Sha256: acdb02469f004ad98abb506c812a1affd213cb075bb831bac232931332f30f39

Contents?: true

Size: 384 Bytes

Versions: 1

Compression:

Stored size: 384 Bytes

Contents

# TODO: Move to Georgia::Indexer
module Georgia
  module Api
    class TagsController < Georgia::ApplicationController

      respond_to :json

      def search
        @tags = Georgia::Indexer.search(ActsAsTaggableOn::Tag, params)

        # Format for select2
        @tags = @tags.map{|t| {id: t.id, text: t.name}}

        respond_with(results: @tags)
      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
georgia-0.7.7 app/controllers/georgia/api/tags_controller.rb