Q: How do I set cookies from Jets?
You can set cookies with the
set_header method in the controller. Here is an example
def index set_header("Set-Cookie", "foo=bar") response.set_header("Custom", "MyHeader") # also works to set headers response.headers["Custom2"] = "MyHeader" # also works to set headers end
Pro tip: Use the <- and -> arrow keys to move back and forward.