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

- old
+ new

@@ -58,17 +58,15 @@ lambda { |v| YAML.load(v) } when :json lambda { |v| JSON.parse(v, symbolize_names: true) } end end + end - def attr_checker(attributes_extractor) - lambda do |cond| - if keys = attributes_extractor.call(cond) - raise ArgumentError, - "You cannot query on mobility attributes translated with the Serialized backend (#{keys.join(", ")})." - end - end + def check_opts(opts) + if keys = extract_attributes(opts) + raise ArgumentError, + "You cannot query on mobility attributes translated with the Serialized backend (#{keys.join(", ")})." end end end end end