Sha256: ec5992af13214e3dafae8615b59bb550a7f1bb9581ae6afad7c59e5ea6cc9f18
Contents?: true
Size: 851 Bytes
Versions: 15
Compression:
Stored size: 851 Bytes
Contents
# frozen_string_literal: true module Hyrax class SearchService < Blacklight::SearchService private def scope @context[:scope] end def method_missing(method_name, *arguments, &block) if scope&.respond_to?(method_name) Deprecation.warn(self.class, "Calling `#{method_name}` on scope " \ 'is deprecated and will be removed in Blacklight 8. Call #to_h first if you ' \ ' need to use hash methods (or, preferably, use your own SearchState implementation)') scope&.public_send(method_name, *arguments, &block) else super end end def respond_to_missing?(method_name, include_private = false) scope&.respond_to?(method_name, include_private) || super end def current_ability @current_ability || @context[:current_ability] end end end
Version data entries
15 entries across 15 versions & 1 rubygems