aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2006-09-29 07:48:16 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2006-09-29 07:48:16 +0000
commitf0152fb610df134f5b3aaeea08ab82cd9643dd5a (patch)
treed750259c067ed6e8fe3441d8916d4baba3416b40 /activerecord/lib
parent3c877ecd8a4ee2a0b27f30ff557b400d567540a6 (diff)
downloadrails-f0152fb610df134f5b3aaeea08ab82cd9643dd5a.tar.gz
rails-f0152fb610df134f5b3aaeea08ab82cd9643dd5a.tar.bz2
rails-f0152fb610df134f5b3aaeea08ab82cd9643dd5a.zip
Include caller of deprecated count method.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5204 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib')
-rw-r--r--activerecord/lib/active_record/calculations.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/calculations.rb b/activerecord/lib/active_record/calculations.rb
index aab0fa2a74..9069b9723e 100644
--- a/activerecord/lib/active_record/calculations.rb
+++ b/activerecord/lib/active_record/calculations.rb
@@ -144,8 +144,9 @@ module ActiveRecord
else
# Deprecated count(conditions, joins=nil)
ActiveSupport::Deprecation.warn(
- "You called count(#{args[0].inspect}, #{args[1].inspect}), which is a deprecated API call. Instead you should use " +
- "count(column_name, options). Passing the conditions and joins as string parameters will be removed in Rails 2.0."
+ "You called count(#{args[0].inspect}, #{args[1].inspect}), which is a deprecated API call. " +
+ "Instead you should use count(column_name, options). Passing the conditions and joins as " +
+ "string parameters will be removed in Rails 2.0.", caller(2)
)
options.merge!(:conditions => args[0])
options.merge!(:joins => args[1]) if args[1]