deprecation warnings

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

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

>
> 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.

> 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

> > 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).