Sha256: 711cd0571e1a737ff791c6944e80f29ced3d744f5b465f1bcc44dc243ae64c1a
Contents?: true
Size: 335 Bytes
Versions: 17
Compression:
Stored size: 335 Bytes
Contents
require 'rdf' require 'cgi' class AuthoritiesController < ApplicationController def query s = params.fetch("q", "") hits = if params[:term] == "location" GeoNamesResource.find_location(s) else LocalAuthority.entries_by_term(params[:model], params[:term], s) rescue [] end render json: hits end end
Version data entries
17 entries across 17 versions & 1 rubygems