Forum: Ruby on Rails Deprecating @session, but it's already set

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.
Aafa8848c4b764f080b1b31a51eab73d?d=identicon&s=25 Phlip (Guest)
on 2007-03-04 22:31
(Received via mailing list)
What do I do about a deprecation warning if my own code is innocent?

RuntimeError: Deprecating @session, but it's already set to
#<ActionController::TestSession:0xb698eb10 @attributes={"flash"=>{}},
@saved_attributes=nil, @session_id="">! Use the session= writer method
instead of setting @session directly.
    /usr/lib/ruby/gems/1.8/gems/actionpack-
blah blah blah
    /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/test_process.rb:353:in
`get'

I might reproduce the problem in a sample project upon request, but this
has
to be easy, right?

Should I grep for a @session.= and monkey-patch it? There are too
freaking
many of them!

--
  Phlip
  http://www.greencheese.us/ZeekLand <-- NOT a blog!!!
40db9e75b3f5899258e3bdc0c9210154?d=identicon&s=25 Conrad Taylor (Guest)
on 2007-03-04 22:42
(Received via mailing list)
Hi, you should be able to do a query/replace to change @session to
session within your rails application.

Good luck,

-Conrad
Aafa8848c4b764f080b1b31a51eab73d?d=identicon&s=25 Phlip (Guest)
on 2007-03-04 23:07
(Received via mailing list)
Conrad Taylor wrote:

> Hi, you should be able to do a query/replace to change @session to
> session within your rails application.

If it were that easy...

...of course I have never used @session! And grep @session . -r returns
no
hits, so no plugin or generator has generated one.

--
  Phlip
  http://www.greencheese.us/ZeekLand <-- NOT a blog!!!
This topic is locked and can not be replied to.