Module: BlacklightHighlight::ControllerExtension
- Defined in:
- lib/blacklight_highlight/controller_extension.rb
Overview
Meant to be applied on top of a controller that implements Blacklight::SolrHelper.
Class Method Summary collapse
Instance Method Summary collapse
-
#highlight_config ⇒ Object
Uses Blacklight.config, needs to be modified when that changes to be controller-based.
Class Method Details
.included(some_class) ⇒ Object
4 5 6 7 8 |
# File 'lib/blacklight_highlight/controller_extension.rb', line 4 def self.included(some_class) some_class.helper_method :highlight_config some_class.helper BlacklightHighlightHelper some_class.send(:include, BlacklightHighlight::SolrHelperExtension) end |
Instance Method Details
#highlight_config ⇒ Object
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.
14 15 16 |
# File 'lib/blacklight_highlight/controller_extension.rb', line 14 def highlight_config Blacklight.config[:highlight] || {} end |