Sha256: fb6eb5a32c32c01eeb3f7a3e6559c70ff458d83d3f95a5d9a23f8dd77ad41b7e
Contents?: true
Size: 771 Bytes
Versions: 20
Compression:
Stored size: 771 Bytes
Contents
#-- # DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE # Version 2, December 2004 # # DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE # TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION # # 0. You just DO WHAT THE FUCK YOU WANT TO. #++ class ${ClassName} helpers do def set_cookie(key, value, path = '/', expires = nil) response.set_cookie key, { :value => value, :path => path, :expires => expires || Time.now + 24 * 60 * 60 } end def get_cookie(key) request.cookies[key] end def cookie_exists?(key) !!get_cookie(key) end def delete_cookie(key) set_cookie key, '', '/', Time.now end end end
Version data entries
20 entries across 20 versions & 1 rubygems