Sha256: 57d989384d4ddaff4a980cb50c225f5359960d263da38f23b49cadcc822869e5

Contents?: true

Size: 679 Bytes

Versions: 21

Compression:

Stored size: 679 Bytes

Contents

# frozen_string_literal: true

module ControllerLevelHelpers
  module ControllerViewHelpers
    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

21 entries across 21 versions & 2 rubygems

Version Path
blacklight-8.6.1 spec/support/controller_level_helpers.rb
blacklight-8.6.0 spec/support/controller_level_helpers.rb
blacklight-8.5.1 spec/support/controller_level_helpers.rb
blacklight-8.5.0 spec/support/controller_level_helpers.rb
blacklight-8.4.0 spec/support/controller_level_helpers.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/blacklight-8.3.0/spec/support/controller_level_helpers.rb
blacklight-8.3.0 spec/support/controller_level_helpers.rb
blacklight-8.2.2 spec/support/controller_level_helpers.rb
blacklight-8.2.1 spec/support/controller_level_helpers.rb
blacklight-8.2.0 spec/support/controller_level_helpers.rb
blacklight-8.1.0 spec/support/controller_level_helpers.rb
blacklight-8.0.1 spec/support/controller_level_helpers.rb
blacklight-8.0.0 spec/support/controller_level_helpers.rb
blacklight-8.0.0.beta8 spec/support/controller_level_helpers.rb
blacklight-8.0.0.beta7 spec/support/controller_level_helpers.rb
blacklight-8.0.0.beta6 spec/support/controller_level_helpers.rb
blacklight-8.0.0.beta5 spec/support/controller_level_helpers.rb
blacklight-8.0.0.beta4 spec/support/controller_level_helpers.rb
blacklight-8.0.0.beta3 spec/support/controller_level_helpers.rb
blacklight-8.0.0.beta2 spec/support/controller_level_helpers.rb