# Reading a cookie that was set in the controller

**URL:** <https://www.ruby-forum.com/t/reading-a-cookie-that-was-set-in-the-controller/186759>\
**Category:** Rails\
**Created:** [February 25, 2008, 8:59pm UTC](https://www.ruby-forum.com/t/reading-a-cookie-that-was-set-in-the-controller/186759 "2008-02-25T20:59:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![donv](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/0ea827/32.png) [@donv](https://www.ruby-forum.com/u/donv)\
**Post date:** [February 25, 2008, 8:59pm UTC](https://www.ruby-forum.com/t/reading-a-cookie-that-was-set-in-the-controller/186759/1 "2008-02-25T20:59:34Z")

</div>

Hi all!

How do I best read a cookie value that was just set in the controller?

The “cookies” object only gives access to cookies present in the  
request, not those set in the response.

response.cookies returns nil in the view, in Rails 1.2.4.

Any suggestions?

Uwe
