Sha256: 22d7af6b06e4396a890cb01915492b0a58c9f5bed116ef92ee25787e20713c55

Contents?: true

Size: 392 Bytes

Versions: 1

Compression:

Stored size: 392 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).results

        # 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.8 app/controllers/georgia/api/tags_controller.rb