Yeah, that's the reason I first thought about using it.
But, as the example demonstrates, when I try to adjust the session value 
within a callback (some calculation done in background thread triggers it) 
then the stored value isn't saved.
Traced the issue to 
http://stackoverflow.com/questions/2139659/access-session-within-rails-controller-thread
 and 
the fact that background processing is done in a separate thread.
Tried to find a workaround, but it seems to be too much hassle.
If you have an elegant suggestion, I'm all ears :-)


On Wednesday, May 29, 2013 4:51:12 PM UTC+2, Hassan Schroeder wrote:
>
> On Wed, May 29, 2013 at 1:12 AM, Vanja Radovanović 
> <elv...@gmail.com<javascript:>> 
> wrote: 
>
> > It seems session is valid only within request cycle context and although 
> it 
> > can be accessed, the changes are not saved, as demonstrated by the 
> project. 
>
> Uh, no. The whole point of "session" is persisting values across 
> requests from a given user-agent. And assuredly it does work. If 
> your example didn't, there's some other issue. 
>
> -- 
> Hassan Schroeder ------------------------ hassan.s...@gmail.com<javascript:> 
> http://about.me/hassanschroeder 
> twitter: @hassan 
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/aeeaea43-6e79-450d-ad07-224ccabe59e0%40googlegroups.com?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to