Class: ActionDispatch::Cookies::MarshalWithJsonFallback

Inherits:
Object
  • Object
show all
Defined in:
lib/action_dispatch/middleware/cookies.rb

Overview

:nodoc:

Class Method Summary collapse

Class Method Details

.dump(value) ⇒ Object



544
545
546
# File 'lib/action_dispatch/middleware/cookies.rb', line 544

def self.dump(value)
  Marshal.dump(value)
end

.load(value) ⇒ Object



538
539
540
541
542
# File 'lib/action_dispatch/middleware/cookies.rb', line 538

def self.load(value)
  Marshal.load(value)
rescue TypeError => e
  ActiveSupport::JSON.decode(value) rescue raise e
end