Sha256: 431d190835373e14ff23ef8dadd7ed125cfd1cca31d87aea40d81cb9c48d3fd5
Contents?: true
Size: 650 Bytes
Versions: 15
Compression:
Stored size: 650 Bytes
Contents
module Mobility module Backend class Sequel::Serialized::QueryMethods < Sequel::QueryMethods def initialize(attributes, **) super attributes_extractor = @attributes_extractor cond_checker = @cond_checker = lambda do |cond| if i18n_keys = attributes_extractor.call(cond) raise ArgumentError, "You cannot query on mobility attributes translated with the Serialized backend (#{i18n_keys.join(", ")})." end end define_method :where do |*cond, &block| cond_checker.call(cond.first) || super(*cond, &block) end end end end end
Version data entries
15 entries across 15 versions & 1 rubygems