Module: BlacklightMoreLikeThis::ControllerExtension

Defined in:
lib/blacklight_more_like_this/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

Class Method Details

.included(some_class) ⇒ Object



4
5
6
7
8
# File 'lib/blacklight_more_like_this/controller_extension.rb', line 4

def self.included(some_class)
  some_class.helper_method :more_like_this_config
  some_class.helper BlacklightMoreLikeThisHelper
  some_class.send(:include, BlacklightMoreLikeThis::SolrHelperExtension)
end

Instance Method Details

#more_like_this_configObject

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_more_like_this/controller_extension.rb', line 14

def more_like_this_config   
  Blacklight.config[:more_like_this] || {}
end