Sha256: 86a77b053acdfdc4bbb0b71e380212ff1b75c2655c9a34244ae7c5a423e54c80
Contents?: true
Size: 363 Bytes
Versions: 37
Compression:
Stored size: 363 Bytes
Contents
module Spree module Core module Middleware class RedirectLegacyProductUrl def initialize(app) @app = app end def call(env) if env["PATH_INFO"] =~ %r{/t/.+/p/(.+)} return [301, {'Location'=> "/products/#{$1}" }, []] end @app.call(env) end end end end end
Version data entries
37 entries across 37 versions & 2 rubygems