Eruby mod_ruby cookie help

I have been able to write and read from a cookie using the examples I
have found but I’m kind of stumped on how to edit a cookie value on the
fly through a URL.

Tried these in my write code.

r.headers_out.add(‘Set-Cookie’, ‘nav=#{cat}; path=/; expires=%s’ % ed)

and

r.headers_out.add(‘Set-Cookie’, ‘nav="#{cat}"; path=/; expires=%s’ % ed)

and

r.headers_out.add(‘Set-Cookie’, ‘nav=’#{cat}’; path=/; expires=%s’ % ed)

What am I missing??

Thanks for any help anyone can offer.