This project is archived and is in readonly mode.

#5130 ✓invalid
Greg Hazel

"warning: default 'to_a' will be obsolete" from method_missing in association_proxy

Reported by Greg Hazel | July 16th, 2010 @ 01:27 AM

Similar to #2121, I get a lot of these:

.../gems/activerecord-2.3.8/lib/active_record/associations/association_proxy.rb:215: warning: default `to_a' will be obsolete

the culprit seems to be the method_missing system. The line of code which kicks things off is:

.../gems/ar-extensions-0.9.2/lib/ar-extensions/extensions.rb:259:in `process'
    values = [*val]

That splat is translated to :to_a for method_missing, so when association_proxy calls @target.send(method, *args, &block), the warning is thrown.

So, I'm not sure where the fix should go, but spamming my log file is certainly not the right solution.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Pages