lib/blind_index.rb in blind_index-2.1.1 vs lib/blind_index.rb in blind_index-2.2.0

- old
+ new

@@ -139,11 +139,15 @@ extend BlindIndex::Model ActiveRecord::TableMetadata.prepend(BlindIndex::Extensions::TableMetadata) ActiveRecord::DynamicMatchers::Method.prepend(BlindIndex::Extensions::DynamicMatchers) - unless ActiveRecord::VERSION::STRING.start_with?("5.1.") + unless ActiveRecord::VERSION::STRING.to_f == 5.1 ActiveRecord::Validations::UniquenessValidator.prepend(BlindIndex::Extensions::UniquenessValidator) + end + + if ActiveRecord::VERSION::STRING.to_f >= 5.2 + ActiveRecord::PredicateBuilder.prepend(BlindIndex::Extensions::PredicateBuilder) end end ActiveSupport.on_load(:mongoid) do require "blind_index/mongoid"