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

Version Path
sufia-5.0.0 app/controllers/authorities_controller.rb
sufia-6.0.0 app/controllers/authorities_controller.rb
sufia-6.0.0.rc4 app/controllers/authorities_controller.rb
sufia-6.0.0.rc3 app/controllers/authorities_controller.rb
sufia-5.0.0.rc1 app/controllers/authorities_controller.rb
sufia-6.0.0.rc2 app/controllers/authorities_controller.rb
sufia-6.0.0.rc1 app/controllers/authorities_controller.rb
sufia-4.3.1 app/controllers/authorities_controller.rb
sufia-6.0.0.beta1 app/controllers/authorities_controller.rb
sufia-4.2.0 app/controllers/authorities_controller.rb
sufia-4.1.0 app/controllers/authorities_controller.rb
sufia-4.0.1 app/controllers/authorities_controller.rb
sufia-4.0.0 app/controllers/authorities_controller.rb
sufia-4.0.0.rc2 app/controllers/authorities_controller.rb
sufia-4.0.0.rc1 app/controllers/authorities_controller.rb
sufia-4.0.0.beta4 app/controllers/authorities_controller.rb
sufia-4.0.0.beta3 app/controllers/authorities_controller.rb