Sha256: d4a6b76cf9a4859ab3ee74a9e3c6e93fb434791f5f743a0a6c38f74001e08891

Contents?: true

Size: 555 Bytes

Versions: 2

Compression:

Stored size: 555 Bytes

Contents

module ActionDispatch::Routing
  class Mapper
    # example
    #   blacklight_for :catalog
    #   blacklight_for :catalog, :dashboard
    #   blacklight_for :catalog, except: [ :saved_searches, :feedback ]
    #   blacklight_for :catalog, only: [ :saved_searches, :solr_document ]
    #   blacklight_for :catalog, constraints: {id: /[0-9]+/ }
    def blacklight_for(*resources)
      options = resources.extract_options!
      resources.map!(&:to_sym)

      Blacklight::Routes.new(self, options.merge(resources: resources)).draw
    
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
blacklight-5.0.0.pre2 lib/blacklight/rails/routes.rb
blacklight-5.0.0.pre1 lib/blacklight/rails/routes.rb