aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorLauro Caetano <laurocaetano1@gmail.com>2014-04-14 21:35:49 -0300
committerLauro Caetano <laurocaetano1@gmail.com>2014-04-14 22:00:55 -0300
commita9416a407b3e5256a0a3fbe6c6ee5112ca3b6703 (patch)
tree72e7606d9d63a2436313d00e594d686ec6bb62e7 /README.md
parent34945e41c24c59268bbde63abfafe20bdc09b775 (diff)
downloadrails-a9416a407b3e5256a0a3fbe6c6ee5112ca3b6703.tar.gz
rails-a9416a407b3e5256a0a3fbe6c6ee5112ca3b6703.tar.bz2
rails-a9416a407b3e5256a0a3fbe6c6ee5112ca3b6703.zip
Make sure the column_name is different from 'all'.
968c581ea34b5236af14805e6a77913b1cb36238 have fixed the EagerLoadTest, but not in the correct way. The problem was when `empty?` or `size` was called on relation. It was triggering `count(:all)`, which was passing `:all` as the column name to `count` on Calculations. On the other hand, the method `calculate` on Calculations was calling `construct_relation_for_association_calculations` instead of `perform_calculation`, because `has_include?` was returning `true` since `column_name` was present. To prevent calling the wrong method to perform the calculation, we have to check if the `column_name` is present and if it is different from `:all` (which is now used to correctly do `count` with `select`). More information here: https://github.com/rails/rails/commit/968c581ea34b5236af14805e6a77913b1cb36238#commitcomment-6006135
Diffstat (limited to 'README.md')
0 files changed, 0 insertions, 0 deletions