Class: ActionDispatch::Cookies::MarshalWithJsonFallback

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

Overview

:nodoc:

Class Method Summary collapse

Class Method Details

.dump(value) ⇒ Object


526
527
528
# File 'actionpack/lib/action_dispatch/middleware/cookies.rb', line 526

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

.load(value) ⇒ Object


520
521
522
523
524
# File 'actionpack/lib/action_dispatch/middleware/cookies.rb', line 520

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