1 class TagsController < ApplicationController
2 before_filter :authenticate_user!
5 User.find(current_user).links.each do |link|
6 tags |= link.tag_list # TODO: this is pretty inefficient. Use one query instead
9 unless params[:query].nil?
10 tags = tags.select do |that| that.include? params[:query] end
13 render :json => {tags: tags}