diff --git a/lib/alavetelitheme.rb b/lib/alavetelitheme.rb index 505c863c..8ffe3d1b 100644 --- a/lib/alavetelitheme.rb +++ b/lib/alavetelitheme.rb @@ -1,5 +1,3 @@ -require 'routingfilter' - class ActionController::Base before_action :set_whatdotheyknow_view_paths diff --git a/lib/routingfilter.rb b/lib/routingfilter.rb deleted file mode 100644 index 12013edc..00000000 --- a/lib/routingfilter.rb +++ /dev/null @@ -1,18 +0,0 @@ -require 'i18n' - -# Monkeypatch the default `locale` filter. Have tried coming up with -# a separate filter but due to the filter chaining order, can't find a -# way to override behaviour of the locale filter in a chain. - -module RoutingFilter - class Locale < Filter - def prepend_segment!(result, segment) - # override the method in RoutingFilter::Locale so that we - # don't prepend the locale for admin links - url = result.is_a?(Array) ? result.first : result - url.sub!(%r(^(http.?://[^/]*)?(.*))) { "#{$1}/#{segment}#{$2 == '/' ? '' : $2}" } if - !url.match(/^\/admin/) - end - end -end -