Sha256: c7724f45573fdbdfd196d92fe3da2487800e9dce0e1d3f331029048317703385
Contents?: true
Size: 1.1 KB
Versions: 2
Compression:
Stored size: 1.1 KB
Contents
# Include hook code here require 'cql_ruby' require 'blacklight_cql' require 'dispatcher' # Call in after_initialze to make sure the default search_fields are # already created, AND the local app has had the opportunity to customize # our placeholder search_field. config.after_initialize do Blacklight.config[:search_fields] << BlacklightCql::SolrHelperExtension.pseudo_search_field end # Wrapping in Dispatcher.to_prepare will, theoretically, take care of things # working properly even in development mode with cache_classes=false (per-request # class reloading). Dispatcher.to_prepare("blacklight_cql.setup") do #Check in case CatalogController _hasn't_ really been re-loaded unless (CatalogController.kind_of?( BlacklightCql::SolrHelperExtension )) # Will over-ride #solr_params to deal with CQL CatalogController.send(:include, BlacklightCql::SolrHelperExtension) # Will over-ride helper methods for search form select, to ensure # query is echo'd properly. CatalogController.send(:helper, BlacklightCql::TemplateHelperExtension) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
blacklight_cql-0.9.1 | rails/init.rb |
blacklight_cql-0.9.0 | rails/init.rb |