app/controllers/concerns/spotlight/controller.rb in blacklight-spotlight-0.34.1 vs app/controllers/concerns/spotlight/controller.rb in blacklight-spotlight-1.0.0.alpha1

- old
+ new

@@ -6,11 +6,10 @@ include Blacklight::Controller include Spotlight::Config included do helper_method :current_site, :current_exhibit, :current_masthead, :exhibit_masthead?, :resource_masthead? - helper_method :redirect_back # helper method backported from Rails 5 end def current_site @current_site ||= Spotlight::Site.instance end @@ -83,19 +82,8 @@ def exhibit_search_facet_url(*args) options = args.extract_options! options = Blacklight::Parameters.sanitize(params.to_unsafe_h.with_indifferent_access).merge(options).except(:exhibit_id, :only_path) spotlight.facet_exhibit_catalog_url(current_exhibit, *args, options) - end - - # Backport from Rails 5 - def redirect_back(fallback_location:, **args) - if defined?(super) - super - elsif request.headers['Referer'] - redirect_to request.headers['Referer'], **args - else - redirect_to fallback_location, **args - end end end end