diff options
author | Bogdan Gusiev <agresso@gmail.com> | 2015-09-03 16:38:59 +0300 |
---|---|---|
committer | Bogdan Gusiev <agresso@gmail.com> | 2015-09-03 16:38:59 +0300 |
commit | 712fc8a570bc0709c3be5645e9808b0ad8fcfe45 (patch) | |
tree | a76e90ac21ef66f20e1de30b056e24b0b633fd46 /CODE_OF_CONDUCT.md | |
parent | 0294c61359340892f0c38f57b203ba58edbc55e5 (diff) | |
download | rails-712fc8a570bc0709c3be5645e9808b0ad8fcfe45.tar.gz rails-712fc8a570bc0709c3be5645e9808b0ad8fcfe45.tar.bz2 rails-712fc8a570bc0709c3be5645e9808b0ad8fcfe45.zip |
HasManyAssociation: moved half of counter cache code to reflection
Current implementation has a lot of utility methods that accept
reflection call a lot of methods on it and exit.
E.g. has_counter_cache?(reflection)
It causes confusion and inability to cache result of the method even
through it always returns the same result for the same reflection
object.
It can be done easier without access to the association context
by moving code into reflection itself.
e.g. reflection.has_counter_cache?
Reflection is less complex object than association so moving code there
automatically makes it simplier to understand.
Diffstat (limited to 'CODE_OF_CONDUCT.md')
0 files changed, 0 insertions, 0 deletions