class TagsController < ApplicationController

  def index

  end

  def prefetch
    @tags = Tag.all.order(:name)
    render json: TagSerializer.for(@tags)
  end

  def search
    @tags = Tag.search(params[:query]).order(:name)
    render json: TagSerializer.for(@tags)
  end

end