lib/journey/resource/where_multiple.rb in embark-journey-0.1.4 vs lib/journey/resource/where_multiple.rb in embark-journey-0.1.5
- old
+ new
@@ -2,11 +2,12 @@
module Journey::Resource::WhereMultiple
extend ActiveSupport::Concern
included do
- def self.where_multiple(clauses)
+ def self.where_multiple(c)
+ clauses = c.dup
query = clauses.delete(:query)
query_keys_with_array_values = query.map do |key, value|
key if value.is_a?(Array)
end.compact
@@ -23,11 +24,12 @@
else
where(clauses.merge(query: query))
end
end
- def self.count_multiple(clauses)
+ def self.count_multiple(c)
# TODO refactor me to re-use all the same recursive query logic in `where_multiple`
+ clauses = c.dup
query = clauses.delete(:query)
query_keys_with_array_values = query.map do |key, value|
key if value.is_a?(Array)
end.compact