diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-10-13 12:56:47 -0700 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-10-13 12:56:47 -0700 |
commit | dcff027a5242b20c0c90eb062dddb22ccf51aed9 (patch) | |
tree | 4f48cbb994b67e07b1842f5e0efa0e875325b4ae /activerecord/lib/active_record/associations/collection_association.rb | |
parent | 3a2093984ff49d86db1efeff0c7581e788ecfb9f (diff) | |
parent | 42d3d3c217d158873409c50c429ae711a0306d99 (diff) | |
download | rails-dcff027a5242b20c0c90eb062dddb22ccf51aed9.tar.gz rails-dcff027a5242b20c0c90eb062dddb22ccf51aed9.tar.bz2 rails-dcff027a5242b20c0c90eb062dddb22ccf51aed9.zip |
Merge pull request #12518 from vipulnsward/remove_count_options
`Relation#count` doesn't use options anymore.
Diffstat (limited to 'activerecord/lib/active_record/associations/collection_association.rb')
-rw-r--r-- | activerecord/lib/active_record/associations/collection_association.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/associations/collection_association.rb b/activerecord/lib/active_record/associations/collection_association.rb index 75f8990cf0..6b06a5f7fd 100644 --- a/activerecord/lib/active_record/associations/collection_association.rb +++ b/activerecord/lib/active_record/associations/collection_association.rb @@ -195,9 +195,7 @@ module ActiveRecord # Count all records using SQL. Construct options and pass them with # scope to the target class's +count+. - def count(column_name = nil, count_options = {}) - column_name, count_options = nil, column_name if column_name.is_a?(Hash) - + def count(column_name = nil) relation = scope if association_scope.distinct_value # This is needed because 'SELECT count(DISTINCT *)..' is not valid SQL. |