Skip to content

Commit

Permalink
Fixed error with Active Record edge [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
ankane committed Jun 5, 2024
1 parent 878e021 commit dd5e8f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/active_median/enumerable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module Enumerable
unless method_defined?(:median)
def median(*args, &block)
if !block && respond_to?(:scoping)
scoping { @klass.median(*args) }
scoping { klass.median(*args) }
elsif !block && respond_to?(:with_scope)
with_scope(self) { klass.median(*args) }
else
Expand All @@ -15,7 +15,7 @@ def median(*args, &block)
unless method_defined?(:percentile)
def percentile(*args, &block)
if !block && respond_to?(:scoping)
scoping { @klass.percentile(*args) }
scoping { klass.percentile(*args) }
elsif !block && respond_to?(:with_scope)
with_scope(self) { klass.percentile(*args) }
else
Expand Down

0 comments on commit dd5e8f1

Please sign in to comment.