method

deserialize

Importance_0
v7.0.0 - Show latest stable - 0 notes - Class: SerializedCookieJars
deserialize(name) protected

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File actionpack/lib/action_dispatch/middleware/cookies.rb, line 568
        def deserialize(name)
          rotate = false
          value  = yield -> { rotate = true }

          if value
            case
            when needs_migration?(value)
              Marshal.load(value).tap do |v|
                self[name] = { value: v }
              end
            when rotate
              serializer.load(value).tap do |v|
                self[name] = { value: v }
              end
            else
              serializer.load(value)
            end
          end
        end
Register or log in to add new notes.