# Deprecation warnings

**URL:** <https://www.ruby-forum.com/t/deprecation-warnings/139107>\
**Category:** Rails\
**Created:** [May 30, 2008, 9:43pm UTC](https://www.ruby-forum.com/t/deprecation-warnings/139107 "2008-05-30T21:43:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![craigrails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/c2a13f/32.png) [@craigrails](https://www.ruby-forum.com/u/craigrails)\
**Post date:** [May 30, 2008, 9:43pm UTC](https://www.ruby-forum.com/t/deprecation-warnings/139107/1 "2008-05-30T21:43:14Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![craigrails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/c2a13f/32.png) [@craigrails](https://www.ruby-forum.com/u/craigrails)\
**Post date:** [May 31, 2008, 7:50pm UTC](https://www.ruby-forum.com/t/deprecation-warnings/139107/2 "2008-05-31T19:50:48Z")

</div>

On 30 May 2008, at 20:41, Craig W. wrote:

> 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

---

<div class="post-metadata">

**Author:** ![craigrails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/c2a13f/32.png) [@craigrails](https://www.ruby-forum.com/u/craigrails)\
**Post date:** [June 1, 2008, 5:47am UTC](https://www.ruby-forum.com/t/deprecation-warnings/139107/3 "2008-06-01T05:47:15Z")

</div>

On Sat, 2008-05-31 at 18:49 +0100, Frederick C. wrote:

> > /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active\_support/  
> > 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

---

<div class="post-metadata">

**Author:** ![craigrails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/c2a13f/32.png) [@craigrails](https://www.ruby-forum.com/u/craigrails)\
**Post date:** [June 1, 2008, 7:28pm UTC](https://www.ruby-forum.com/t/deprecation-warnings/139107/4 "2008-06-01T19:28:27Z")

</div>

On Sun, 2008-06-01 at 03:54 -0700, Frederick C. wrote:

> > OK…I’m trying to get a handle on what you are telling me.
> > 
> > \<% 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

---

<div class="post-metadata">

**Author:** ![craigrails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/c2a13f/32.png) [@craigrails](https://www.ruby-forum.com/u/craigrails)\
**Post date:** [June 1, 2008, 12:55pm UTC](https://www.ruby-forum.com/t/deprecation-warnings/139107/5 "2008-06-01T12:55:30Z")

</div>

On Jun 1, 4:46 am, Craig W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> 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
