Ruby on Rails question

Discussion in 'Ruby' started by gregarican, May 6, 2005.

  1. gregarican

    gregarican Guest

    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?
    gregarican, May 6, 2005
    #1
    1. Advertising

  2. gregarican

    James Britt Guest

    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

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

    James
    James Britt, May 6, 2005
    #2
    1. Advertising

  3. gregarican

    gregarican Guest

    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
    >
    >
    >(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!
    gregarican, May 6, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    6
    Views:
    175
    Michael Campbell
    Mar 17, 2005
  2. Michael Schuerig
    Replies:
    3
    Views:
    214
    Carl Youngblood
    Jun 17, 2005
  3. Josef 'Jupp' SCHUGT
    Replies:
    5
    Views:
    160
    Stephan Kämper
    Jan 24, 2006
  4. Nathaniel Brown
    Replies:
    2
    Views:
    125
    gabriele renzi
    Mar 26, 2006
  5. Jason Wong
    Replies:
    0
    Views:
    159
    Jason Wong
    Nov 20, 2007
Loading...

Share This Page