Sha256: aaa93240e521a2bedfc4bfbfa260997ac12aea79e1eed965631a874cdce53bb5
Contents?: true
Size: 747 Bytes
Versions: 23
Compression:
Stored size: 747 Bytes
Contents
module ControllerLevelHelpers def search_state @search_state ||= Blacklight::SearchState.new(params, blacklight_config) end def current_site Spotlight::Site.instance end def blacklight_configuration_context @blacklight_configuration_context ||= Blacklight::Configuration::Context.new(controller) end def initialize_controller_helpers(helper) helper.extend ControllerLevelHelpers initialize_routing_helpers(helper) end def initialize_routing_helpers(helper) return unless Rails::VERSION::MAJOR >= 5 helper.class.include ::Rails.application.routes.url_helpers helper.class.include ::Rails.application.routes.mounted_helpers if ::Rails.application.routes.respond_to?(:mounted_helpers) end end
Version data entries
23 entries across 23 versions & 1 rubygems