I''m still using 1.2.6 and have an eye on upgrading to 2.0 so I monitor the logs for deprecation warnings. I thought I was clean and log/development.log shows nothing when doing ''grep deprec log/development.log'' but in testing, one of my testing controllers throws a bunch of these on screen... /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/core_ext/symbol.rb:10: warning: Object#id will be deprecated; use Object#object_id So I''m thinking that it comes from some of my view templates which I suppose I can clean up but I need to locate where these are coming from. But if I run through some of the view templates on this controller (and there are a lot and in various folders), I still don''t get any deprecation warnings in log/development.log How can I figure out where these are coming from? Craig --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On 30 May 2008, at 20:41, Craig White wrote:> > I''m still using 1.2.6 and have an eye on upgrading to 2.0 so I monitor > the logs for deprecation warnings. I thought I was clean and > log/development.log shows nothing when doing ''grep deprec > log/development.log'' but in testing, one of my testing controllers > throws a bunch of these on screen... > > /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/ > core_ext/symbol.rb:10: warning: Object#id will be deprecated; use > Object#object_id > > So I''m thinking that it comes from some of my view templates which I > suppose I can clean up but I need to locate where these are coming > from.> But if I run through some of the view templates on this controller > (and > there are a lot and in various folders), I still don''t get any > deprecation warnings in log/development.log > > How can I figure out where these are coming from?It could be in the test code itself. The fact that it happens in symbol suggests that you''ve got a line somewhere that does map &:id (or collect, or some other enumerable function) and that that collection contains at least one thing that is not an instance an ActiveRecord::Base descendant. Fred --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Sat, 2008-05-31 at 18:49 +0100, Frederick Cheung wrote:> > On 30 May 2008, at 20:41, Craig White wrote: > > > > > I''m still using 1.2.6 and have an eye on upgrading to 2.0 so I monitor > > the logs for deprecation warnings. I thought I was clean and > > log/development.log shows nothing when doing ''grep deprec > > log/development.log'' but in testing, one of my testing controllers > > throws a bunch of these on screen... > > > > /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/ > > core_ext/symbol.rb:10: warning: Object#id will be deprecated; use > > Object#object_id > > > > So I''m thinking that it comes from some of my view templates which I > > suppose I can clean up but I need to locate where these are coming > > from. > > > But if I run through some of the view templates on this controller > > (and > > there are a lot and in various folders), I still don''t get any > > deprecation warnings in log/development.log > > > > How can I figure out where these are coming from? > > It could be in the test code itself. The fact that it happens in > symbol suggests that you''ve got a line somewhere that does map &:id > (or collect, or some other enumerable function) and that that > collection contains at least one thing that is not an instance an > ActiveRecord::Base descendant.---- OK...I''m trying to get a handle on what you are telling me. This happens to be an extremely large test file (3000 lines). Perusal suggests that the only way I am using :id in this test file is with post commands (I changed all of the the ''get :some_method :id => 1'' to post commands just in case). seeing as how my ''rake test:functionals'' returns... 417 tests, 5721 assertions, 0 failures, 0 errors but this above deprecation notices only comes from my ''reports_controller_test'' I have to believe that it''s from my view templates. does this usage cause a problem? (I can''t see why it would) <% for incident in IncidentReport.include facility.id, @inc_beg_date, @inc_end_date %> Craig --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Jun 1, 4:46 am, Craig White <craigwh...-BQ75lA0ptkhBDgjK7y7TUQ@public.gmane.org> wrote:> > It could be in the test code itself. The fact that it happens in > > symbol suggests that you''ve got a line somewhere that does map &:id > > (or collect, or some other enumerable function) and that that > > collection contains at least one thing that is not an instance an > > ActiveRecord::Base descendant. > > ---- > OK...I''m trying to get a handle on what you are telling me. > > This happens to be an extremely large test file (3000 lines). > > Perusal suggests that the only way I am using :id in this test file is > with post commands (I changed all of the the ''get :some_method :id => 1'' > to post commands just in case). > > seeing as how my ''rake test:functionals'' returns... > > 417 tests, 5721 assertions, 0 failures, 0 errors > > but this above deprecation notices only comes from my > ''reports_controller_test'' I have to believe that it''s from my view > templates.I don''t think that follows. A deprecation warning isn''t a test failure or an error.> > does this usage cause a problem? (I can''t see why it would) > > <% for incident in IncidentReport.include facility.id, @inc_beg_date, > @inc_end_date %> >unlikely. (but the obvious way to find out would be to remove and see if it makes a difference). Fred> Craig--~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Sun, 2008-06-01 at 03:54 -0700, Frederick Cheung wrote:> > > On Jun 1, 4:46 am, Craig White <craigwh...-BQ75lA0ptkhBDgjK7y7TUQ@public.gmane.org> wrote: > > > It could be in the test code itself. The fact that it happens in > > > symbol suggests that you''ve got a line somewhere that does map &:id > > > (or collect, or some other enumerable function) and that that > > > collection contains at least one thing that is not an instance an > > > ActiveRecord::Base descendant. > > > > ---- > > OK...I''m trying to get a handle on what you are telling me. > > > > This happens to be an extremely large test file (3000 lines). > > > > Perusal suggests that the only way I am using :id in this test file is > > with post commands (I changed all of the the ''get :some_method :id => 1'' > > to post commands just in case). > > > > seeing as how my ''rake test:functionals'' returns... > > > > 417 tests, 5721 assertions, 0 failures, 0 errors > > > > but this above deprecation notices only comes from my > > ''reports_controller_test'' I have to believe that it''s from my view > > templates. > > I don''t think that follows. A deprecation warning isn''t a test failure > or an error. > > > > > does this usage cause a problem? (I can''t see why it would) > > > > <% for incident in IncidentReport.include facility.id, @inc_beg_date, > > @inc_end_date %> > > > unlikely. (but the obvious way to find out would be to remove and see > if it makes a difference).---- thanks...I got it and it wasn''t view code but rather a poorly constructed find in the controller using ez_where plugin. I fixed it...problem solved. I still don''t know why the same deprecation warning didn''t come up in development.log Craig --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---