Skip to content

Commit c466a1e

Browse files
committed
Correctly attach PredicateBuilderExtension
1 parent 9e60662 commit c466a1e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/polymorphic_integer_type/predicate_builder_extension.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module PolymorphicIntegerType
22
module PredicateBuilderExtension
3-
def self.expand(klass, table, column, value)
3+
def expand(klass, table, column, value)
44
queries = []
55

66
# Find the foreign key when using queries such as:
@@ -33,4 +33,4 @@ def self.expand(klass, table, column, value)
3333
end
3434
end
3535

36-
ActiveRecord::PredicateBuilder.prepend(PolymorphicIntegerType::PredicateBuilderExtension)
36+
ActiveRecord::PredicateBuilder.singleton_class.prepend(PolymorphicIntegerType::PredicateBuilderExtension)

0 commit comments

Comments
 (0)