Class: Spotlight::SearchState
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Spotlight::SearchState
- Defined in:
- lib/spotlight/search_state.rb
Overview
Override Blacklight::SearchState to use exhibit-specific routes for documents
Instance Attribute Summary collapse
-
#current_exhibit ⇒ Object
readonly
Returns the value of attribute current_exhibit.
Instance Method Summary collapse
-
#initialize(search_state, current_exhibit) ⇒ SearchState
constructor
A new instance of SearchState.
- #url_for_document(document, options = {}) ⇒ Object
Constructor Details
#initialize(search_state, current_exhibit) ⇒ SearchState
Returns a new instance of SearchState.
8 9 10 11 |
# File 'lib/spotlight/search_state.rb', line 8 def initialize(search_state, current_exhibit) super(search_state) @current_exhibit = current_exhibit end |
Instance Attribute Details
#current_exhibit ⇒ Object (readonly)
Returns the value of attribute current_exhibit.
6 7 8 |
# File 'lib/spotlight/search_state.rb', line 6 def current_exhibit @current_exhibit end |
Instance Method Details
#url_for_document(document, options = {}) ⇒ Object
13 14 15 16 17 |
# File 'lib/spotlight/search_state.rb', line 13 def url_for_document(document, = {}) return super unless current_exhibit [controller.spotlight, current_exhibit, document] end |