Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
NARKOZ
· 11y ago · 0 comments
Author could use counter cache to solve the problem.
Comments
[–]
schneidmaster
11y ago
Author here. That would work for a count (so perhaps that was a poor example to choose for this post) but we also use calculated_attributes for many more complex cases (for example, querying the earliest date in 3 columns across 3 tables).
[–]
NARKOZ
OP
11y ago
There is a gem called eager_group that you might find useful.