Files
openfoodnetwork/config/initializers/rack_rewrite.rb
Frank West f7848b025f Add rack-rewrite to handle redirects
We are moving bulk edit to a different route and we want to be able to
handle redirects on this route. Handling this at the rack level before
the rails stack is the most performant way outside of rewrites on the
web server itself.
2018-06-19 17:51:23 +10:00

8 lines
239 B
Ruby

module Openfoodnetwork
class Application < Rails::Application
config.middleware.insert_before(Rack::Lock, Rack::Rewrite) do
r301 '/admin/products/bulk_edit', '/admin/products' # TODO: Date added 15/06/2018
end
end
end