Sha256: bc53d41c312eb1f084f8ee8622b7596ba69727605ed3a4cc51d8d2222c8867cf
Contents?: true
Size: 428 Bytes
Versions: 16
Compression:
Stored size: 428 Bytes
Contents
class TagsController < ApplicationController respond_to :json def index respond_to do |format| format.json do tags = begin if params[:search] ActsAsTaggableOn::Tag.distinct.where('name LIKE ?', "%#{params[:search]}%").pluck(:name) else ActsAsTaggableOn::Tag.distinct.pluck(:name) end end render json: tags end end end end
Version data entries
16 entries across 16 versions & 1 rubygems