Q:

Sinatra unable to set cookies from helper file

I have a helper file in my sinatra app that has the following code:

require'sinatra'
require 'rack/utils'

module Rack
  module Utils
    def set_cookie(name, value, expires = nil, path = '/', domain = nil, secure = false)
      if expires
        expires = Time.at(expires