app/controllers/projects_controller.rb
# return tags for the tagit controls
# expects a tag_class param with the name of the tag class to query
# expects a term param with the search term
return tags for the tagit controls
expects a tag_class param with the name of the tag class to query
expects a term param with the search term
return tags for the tagit controls expects a tag_class param with the name of the tag class to query expects a term param with the search term
def tags
    klass = Object.const_get("Concepts").const_get(params[:tag_class])
    results = klass.search_for_label_starting_with(params[:term]).map(&:label)
    render :json => results.uniq.sort
  end
def tags klass = Object . const_get ( "Concepts" ) . const_get ( params [ :tag_class ] ) results = klass . search_for_label_starting_with ( params [ :term ] ) . map ( & :label ) render :json => results . uniq . sort end
return tags for the tagit controls
expects a tag_class param with the name of the tag class to query
expects a term param with the search term
return tags for the tagit controls expects a tag_class param with the name of the tag class to query expects a term param with the search term