# Ruby on Rails question

**URL:** https://rubytalk.org/t/ruby-on-rails-question/18193
**Category:** ruby-talk
**Created:** [6 May 2005 15:39 UTC](https://rubytalk.org/t/ruby-on-rails-question/18193 "2005-05-06T15:39:24Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![gregarican](https://avatars.discourse-cdn.com/v4/letter/g/7feea3/32.png) [@gregarican](https://rubytalk.org/u/gregarican)
#### Post date: [6 May 2005 15:39 UTC](https://rubytalk.org/t/ruby-on-rails-question/18193/1 "2005-05-06T15:39:24Z")

</div>

Sorry if this isn't the appropriate place to post this...

I am putting the finishing touches on a ROR app I have created for my  
company's purchase order processing. There are back-end integrations  
such as batch faxing using HylaFAX and e-mail notification for P.O.  
processing events (initiation, completion, etc.). One of the final  
hurdles I am trying to get past is creating and checking session  
cookies in order to determine who is using the P.O. app. This will  
determine who the faxes and e-mails will be attributed to.

Today I tried to work with the cookies method that resides under the  
ActionController. I tried something simple like:

cookies["user"] = "#{@params['employee']['initia­ls']}"  
render\_text "Login successful! Cookie stored as... #{cookies["user"]}"

This should look at the CGI parameter that's passed along for the  
employee's initials and store them in a cookie. Problem is that nothing

is returned and the page header shows nothing in the cookie value. I am

using a default ROR 0.12.0 installation running on Apache 2.0.52 on a  
Windows 2000 box. All of the features from CGI::Cookie work if I do  
things the "long way", however. But the ActionController cookie method  
doesn't do anything.

Is there something that I'm missing here?

---

<div class="post-metadata">

### Author: ![James\_Britt4](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@James\_Britt4](https://rubytalk.org/u/James_Britt4)
#### Post date: [6 May 2005 16:19 UTC](https://rubytalk.org/t/ruby-on-rails-question/18193/2 "2005-05-06T16:19:54Z")

</div>

gregarican wrote:

> Sorry if this isn't the appropriate place to post this...

If you don't get an answer here, there is a Rails developer mailing list that may be better suited for your questions:

[http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)

(Maybe this should go into the c.l.r FAQ?)

James

---

<div class="post-metadata">

### Author: ![gregarican](https://avatars.discourse-cdn.com/v4/letter/g/7feea3/32.png) [@gregarican](https://rubytalk.org/u/gregarican)
#### Post date: [6 May 2005 16:29 UTC](https://rubytalk.org/t/ruby-on-rails-question/18193/3 "2005-05-06T16:29:26Z")

</div>

James Britt wrote:

> If you don't get an answer here, there is a Rails developer mailing

list

> that may be better suited for your questions:
> 
> [http://lists.rubyonrails.org/m­ailman/listinfo/rails](http://lists.rubyonrails.org/m%C2%ADailman/listinfo/rails)
> 
> (Maybe this should go into the c.l.r FAQ?)
> 
> James

Thanks for the information. So far the CGI::Cookie.new method will  
create the cookie and I can query its contents. But the  
ActionController's cookies method doesn't do the same. It seems pretty  
straightforward but perhaps there's some setting that I need to change  
somewhere. Oh well, thanks for the URL!
