Sha256: 810b4cff2b8e25ad22a948431062a5cc1f9a987b3b5ac59bd61763b3832a883f
Contents?: true
Size: 692 Bytes
Versions: 24
Compression:
Stored size: 692 Bytes
Contents
module Alchemy module Middleware class RescueOldCookies def initialize(app) @app = app end def call(env) begin @app.call(env) rescue NameError => error if error.to_s =~ /uninitialized constant Alchemy::Clipboard/ message = "<h2>You have an old style Alchemy clipboard in your session!</h2>" message += "<h3>Please remove your cookies and try again.</h3>" Rails.logger.error(error) return [ 500, { "Content-Type" => "text/html" }, [message] ] else raise error end end end end end end
Version data entries
24 entries across 24 versions & 2 rubygems