Sha256: f83bbf6060592f44bfc5c2c7e9ae97c55ab8421e30ea1c9656ea9590941b4143

Contents?: true

Size: 475 Bytes

Versions: 5

Compression:

Stored size: 475 Bytes

Contents

# -*- encoding : utf-8 -*-
class SearchHistoryController < ApplicationController
  def index
    @searches = searches_from_history
  end
  
  
  #TODO we may want to remove unsaved (those without user_id) items from the database when removed from history
  def clear
    if session[:history].clear
      flash[:notice] = "Cleared your search history."
    else
      flash[:error] = "There was a problem clearing your search history."
    end
    redirect_to :back
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
blacklight-3.1.2 app/controllers/search_history_controller.rb
blacklight-3.1.1 app/controllers/search_history_controller.rb
blacklight-3.1.0 app/controllers/search_history_controller.rb
blacklight-3.0.0 app/controllers/search_history_controller.rb
blacklight-3.0.0pre8 app/controllers/search_history_controller.rb