Module: Blacklight::SearchHistory
- Extended by:
- ActiveSupport::Concern
- Includes:
- Configurable, SearchContext
- Included in:
- SearchHistoryController
- Defined in:
- app/controllers/concerns/blacklight/search_history.rb
Instance Attribute Summary
Attributes included from Configurable
Instance Method Summary collapse
-
#clear ⇒ Object
TODO: we may want to remove unsaved (those without user_id) items from the database when removed from history.
- #index ⇒ Object
Methods included from SearchContext
#current_search_session, #page_links, #searches_from_history
Methods included from Configurable
default_configuration, default_configuration=
Instance Method Details
#clear ⇒ Object
TODO: we may want to remove unsaved (those without user_id) items from the database when removed from history
19 20 21 22 23 24 25 26 27 |
# File 'app/controllers/concerns/blacklight/search_history.rb', line 19 def clear if session[:history].clear flash[:notice] = I18n.t('blacklight.search_history.clear.success') else flash[:error] = I18n.t('blacklight.search_history.clear.failure') end redirect_back fallback_location: blacklight.search_history_path end |
#index ⇒ Object
13 14 15 |
# File 'app/controllers/concerns/blacklight/search_history.rb', line 13 def index @searches = searches_from_history end |