lib/mobility/backends/sequel/serialized/query_methods.rb in mobility-0.3.6 vs lib/mobility/backends/sequel/serialized/query_methods.rb in mobility-0.4.0

- old
+ new

@@ -1,16 +1,17 @@ require "mobility/backends/sequel/query_methods" module Mobility module Backends class Sequel::Serialized::QueryMethods < Sequel::QueryMethods + include Serialized + def initialize(attributes, _) super - attributes_extractor = @attributes_extractor - cond_checker = Backends::Serialized.attr_checker(attributes_extractor) + q = self define_method :where do |*cond, &block| - cond_checker.call(cond.first) || super(*cond, &block) + q.check_opts(cond.first) || super(*cond, &block) end end end end end