Guest User

Untitled

a guest
Apr 22nd, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. def set_cookie(name, value, expires)
  2. (headers['Set-Cookie'] ||=[]) << (Merb::Const::SET_COOKIE % [
  3. name.to_s,
  4. ::Merb::Request.escape(value.to_s),
  5. # Cookie expiration time must be GMT. See RFC 2109
  6. expires.gmtime.strftime(Merb::Const::COOKIE_EXPIRATION_FORMAT)
  7. ])
  8. end
Add Comment
Please, Sign In to add comment