Sha256: aaa7492ad105165e16d1a587456be4b949bc5b1898c20aabdef5bb9070d19ad5

Contents?: true

Size: 709 Bytes

Versions: 28

Compression:

Stored size: 709 Bytes

Contents

# frozen_string_literal: true
module ControllerLevelHelpers
  module ControllerViewHelpers
    include Blacklight::Facet

    def search_state
      @search_state ||= Blacklight::SearchState.new(params, blacklight_config, controller)
    end

    def blacklight_configuration_context
      @blacklight_configuration_context ||= Blacklight::Configuration::Context.new(controller)
    end
  end

  def initialize_controller_helpers(helper)
    helper.extend ControllerViewHelpers
  end

  # Monkeypatch to fix https://github.com/rspec/rspec-rails/pull/2521
  def _default_render_options
    val = super
    return val unless val[:handlers]

    val.merge(handlers: val.fetch(:handlers).map(&:to_sym))
  end
end

Version data entries

28 entries across 28 versions & 2 rubygems

Version Path
blacklight-7.40.0 spec/support/controller_level_helpers.rb
blacklight-7.39.0 spec/support/controller_level_helpers.rb
blacklight-7.38.0 spec/support/controller_level_helpers.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/blacklight-7.37.0/spec/support/controller_level_helpers.rb
blacklight-7.37.0 spec/support/controller_level_helpers.rb
blacklight-7.36.2 spec/support/controller_level_helpers.rb
blacklight-7.36.1 spec/support/controller_level_helpers.rb
blacklight-7.36.0 spec/support/controller_level_helpers.rb
blacklight-7.35.0 spec/support/controller_level_helpers.rb
blacklight-7.34.0 spec/support/controller_level_helpers.rb
blacklight-7.33.1 spec/support/controller_level_helpers.rb
blacklight-7.33.0 spec/support/controller_level_helpers.rb
blacklight-7.32.0 spec/support/controller_level_helpers.rb
blacklight-7.31.0 spec/support/controller_level_helpers.rb
blacklight-7.30.0 spec/support/controller_level_helpers.rb
blacklight-7.29.0 spec/support/controller_level_helpers.rb
blacklight-7.28.0 spec/support/controller_level_helpers.rb
blacklight-7.27.1 spec/support/controller_level_helpers.rb
blacklight-7.27.0 spec/support/controller_level_helpers.rb
blacklight-7.26.1 spec/support/controller_level_helpers.rb