diff options
author | Ernie Miller <ernie@metautonomo.us> | 2008-08-28 14:01:42 -0400 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-08-28 11:58:25 -0700 |
commit | 44af2efa2c7391681968c827ca47201a0a02e974 (patch) | |
tree | a25ede2a88799c281468fcdaa4321d6048cee240 /activerecord/lib/active_record/associations.rb | |
parent | ce4d13861dc54a1ac7fbe411327b9a2427f95366 (diff) | |
download | rails-44af2efa2c7391681968c827ca47201a0a02e974.tar.gz rails-44af2efa2c7391681968c827ca47201a0a02e974.tar.bz2 rails-44af2efa2c7391681968c827ca47201a0a02e974.zip |
Refactored AssociationCollection#count for uniformity and Ruby 1.8.7 support.
[#831 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
Diffstat (limited to 'activerecord/lib/active_record/associations.rb')
-rwxr-xr-x | activerecord/lib/active_record/associations.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb index 4d935612ca..98710dee09 100755 --- a/activerecord/lib/active_record/associations.rb +++ b/activerecord/lib/active_record/associations.rb @@ -1164,6 +1164,9 @@ module ActiveRecord # If true, duplicate associated objects will be ignored by accessors and query methods. # [:finder_sql] # Overwrite the default generated SQL statement used to fetch the association with a manual statement + # [:counter_sql] + # Specify a complete SQL statement to fetch the size of the association. If <tt>:finder_sql</tt> is + # specified but not <tt>:counter_sql</tt>, <tt>:counter_sql</tt> will be generated by replacing <tt>SELECT ... FROM</tt> with <tt>SELECT COUNT(*) FROM</tt>. # [:delete_sql] # Overwrite the default generated SQL statement used to remove links between the associated # classes with a manual statement. |