Module: Blacklight::SearchHistory
- Extended by:
- ActiveSupport::Concern
- Includes:
- Configurable
- 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 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
17 18 19 20 21 22 23 24 25 |
# File 'app/controllers/concerns/blacklight/search_history.rb', line 17 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
11 12 13 |
# File 'app/controllers/concerns/blacklight/search_history.rb', line 11 def index @searches = searches_from_history end |