Sha256: db2a79ef6f0cee76eb7c90d3ec9e3017b8497edd53acbaf6f5dbbdfa55703082

Contents?: true

Size: 395 Bytes

Versions: 10

Compression:

Stored size: 395 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
        begin
          LocalAuthority.entries_by_term(params[:model], params[:term], s)
        rescue
          []
        end
      end
    render json: hits
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
sufia-6.7.0 app/controllers/authorities_controller.rb
sufia-7.0.0.beta4 app/controllers/authorities_controller.rb
sufia-7.0.0.beta3 app/controllers/authorities_controller.rb
sufia-7.0.0.beta2 app/controllers/authorities_controller.rb
sufia-7.0.0.beta1 app/controllers/authorities_controller.rb
sufia-6.6.1 app/controllers/authorities_controller.rb
sufia-6.6.0 app/controllers/authorities_controller.rb
sufia-6.5.0 app/controllers/authorities_controller.rb
sufia-6.4.0 app/controllers/authorities_controller.rb
sufia-6.3.0 app/controllers/authorities_controller.rb