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!!!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
Hi, you should be able to do a query/replace to change @session to session within your rails application. Good luck, -Conrad On 3/4/07, Phlip <phlip2005-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > 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!!! > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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!!! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Actually I had the test case containing the get :index inside a suite derived from Test::Rails::ViewTestCase; moving it to a normal functional suite fixed the problem. The error message could have been clearer, though! ;-)> -- > Phlip > http://www.greencheese.us/ZeekLand <-- NOT a blog!!!--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---