|
[BUG] Useless deprecation warning in ActiveRecord::Calculations: msg#00248lang.ruby.rails.core
I'm posting this here because I can't get it posted to the trac. ActiveRecord::Calculations#construct_count_options_from_legacy_args raises a deprecation warning. The only trouble is, it's only ever called from ActiveRecord::Calculations::count, so it repeatedly tells me I've called the offending deprecated function from within rails itself. The quick fix is to add 'caller(2)' to the arglist for ActiveSupport::Deprecation#warn. A better solution might be to use something akin to the Perlish 'carp', which walks up the call stack to find the first caller frame (above the frame that made the call to carp) that isn't from the same package/class as the call to carp and uses that as the place to report the error from. -- Piers Cawley <pdcawley@xxxxxxxxxxx> http://www.bofh.org.uk/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@xxxxxxxxxxxxxxxx To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@xxxxxxxxxxxxxxxx For more options, visit this group at http://groups.google.com/group/rubyonrails-core -~----------~----~----~----~------~----~------~--~---
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: ActiveSupport::Multibyte for better Unicode support, Michael Glaesemann |
|---|---|
| Next by Date: | Re: [BUG] Useless deprecation warning in ActiveRecord::Calculations, Piers Cawley |
| Previous by Thread: | [Newbie] Trying to use Inflections in a non active record class, anand.sankaran@xxxxxxxxx |
| Next by Thread: | Re: [BUG] Useless deprecation warning in ActiveRecord::Calculations, Piers Cawley |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |