serialize

serialize(name, value) Instance Protected methods

needs_migration?

needs_migration?(value) Instance Protected methods

deserialize

deserialize(name, value) Instance Protected methods

load

load(value) Class Public methods

dump

dump(value) Class Public methods

load

load(value) Class Public methods

dump

dump(value) Class Public methods

signed_or_encrypted

signed_or_encrypted() Instance Public methods Returns the signed or encrypted jar, preferring encrypted if secret_key_base is set. Used by ActionDispatch::Session::CookieStore to avoid the need to introduce new cookie stores.

signed

signed() Instance Public methods Returns a jar that'll automatically generate a signed representation of cookie value and verify it when reading from the cookie again. This is useful for creating cookies with values that the user is not supposed to change. If a signed cookie was tampered with by the user (or a 3rd party), nil will be returned. If secrets.secret_key_base and secrets.secret_token (deprecated) are both set, legacy cookies signed with the old key generator will be tran

permanent

permanent() Instance Public methods Returns a jar that'll automatically set the assigned cookies to have an expiration date 20 years from now. Example: cookies.permanent[:prefers_open_id] = true # => Set-Cookie: prefers_open_id=true; path=/; expires=Sun, 16-Dec-2029 03:24:16 GMT This jar is only meant for writing. You'll read permanent cookies through the regular accessor. This jar allows chaining with the signed jar as well, so you can set permanent, signed cookies. Examples: