Forum: Ruby on Rails Session Variable in Application.rb

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
685aa1b790ce889ca560415bc9443940?d=identicon&s=25 unknown (Guest)
on 2008-10-25 13:14
(Received via mailing list)
I'm having a problem referencing the session variable from a class
within the application.rb file.

undefined local variable or method `session' for #<Turnrun:
0x2abc20195440 @runreport=[], @turnstotake="5">

I'm not sure what i'm doing wrong or why this error would occur...does
anyone have any ideas?
81b61875e41eaa58887543635d556fca?d=identicon&s=25 Frederick Cheung (Guest)
on 2008-10-25 14:27
(Received via mailing list)
On Oct 24, 11:57 pm, james.white...@gmail.com wrote:
> I'm having a problem referencing the session variable from a class
> within the application.rb file.
>
> undefined local variable or method `session' for #<Turnrun:
> 0x2abc20195440 @runreport=[], @turnstotake="5">
>
> I'm not sure what i'm doing wrong or why this error would occur...does
> anyone have any ideas?

Sounds like you're calling session from an object other that the
controller. That doesn't work. showing a little more code might allow
a more informative answer.

Fred
This topic is locked and can not be replied to.