Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Include caller of deprecated count method.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5204 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit f0152fb610df134f5b3aaeea08ab82cd9643dd5a 1 parent 3c877ec
@jeremy jeremy authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 activerecord/lib/active_record/calculations.rb
View
5 activerecord/lib/active_record/calculations.rb
@@ -144,8 +144,9 @@ def construct_count_options_from_legacy_args(*args)
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]
Please sign in to comment.
Something went wrong with that request. Please try again.