Skip to content

Commit

Permalink
fix count method signature for active_record60
Browse files Browse the repository at this point in the history
- refs 95ffb25
    - 95ffb25
  • Loading branch information
kaishuu0123 committed Jan 17, 2024
1 parent f15e7a1 commit f063cad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/bullet/active_record60.rb
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ def count_records

::ActiveRecord::Associations::CollectionProxy.prepend(
Module.new do
def count
def count(column_name = nil)
if Bullet.start? && !proxy_association.is_a?(::ActiveRecord::Associations::ThroughAssociation)
Bullet::Detector::CounterCache.add_counter_cache(
proxy_association.owner,
Expand All @@ -293,7 +293,7 @@ def count
proxy_association.reflection.name
)
end
super
super(column_name)
end
end
)
Expand Down

0 comments on commit f063cad

Please sign in to comment.