Sha256: 4dd01809f8ccd178bae854a5509111406c96976c3b2e501b7e749f2323a32f70

Contents?: true

Size: 617 Bytes

Versions: 4

Compression:

Stored size: 617 Bytes

Contents

# Meant to be applied on top of a controller that implements
# Blacklight::SolrHelper. 
module BlacklightHighlight::ControllerExtension
  def self.included(some_class)
    some_class.helper_method :highlight_config
    some_class.helper BlacklightHighlightHelper
    some_class.send(:include, BlacklightHighlight::SolrHelperExtension)
  end

  # Uses Blacklight.config, needs to be modified when
  # that changes to be controller-based. This is the only method
  # in this plugin that accesses Blacklight.config, single point
  # of contact. 
  def highlight_config
    Blacklight.config[:highlight] || {}
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
blacklight_highlight-0.0.3 lib/blacklight_highlight/controller_extension.rb
blacklight_highlight-0.0.2 lib/blacklight_highlight/controller_extension.rb
blacklight_highlight-0.0.1 lib/blacklight_highlight/controller_extension.rb
blacklight_highlight-0.0.1pre1 lib/blacklight_highlight/controller_extension.rb