mongoid_query_string_interface 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/lib/mongoid/parsers/filter_parser.rb +6 -2
- data/lib/version.rb +1 -1
- metadata +3 -3
data/Gemfile.lock
CHANGED
@@ -77,7 +77,9 @@ module Mongoid
|
|
77
77
|
|
78
78
|
private
|
79
79
|
def parsed_attribute
|
80
|
-
if
|
80
|
+
if raw_attribute.is_a?(Mongoid::Criterion::Complex)
|
81
|
+
raw_attribute.key.to_s
|
82
|
+
elsif or_attribute?
|
81
83
|
'$or'
|
82
84
|
elsif raw_attribute =~ Mongoid::QueryStringInterface::ATTRIBUTE_REGEX
|
83
85
|
$1
|
@@ -141,7 +143,9 @@ module Mongoid
|
|
141
143
|
end
|
142
144
|
|
143
145
|
def operator_from(attribute)
|
144
|
-
if
|
146
|
+
if attribute.is_a?(Mongoid::Criterion::Complex)
|
147
|
+
"$#{attribute.operator}"
|
148
|
+
elsif or_attribute?
|
145
149
|
'$or'
|
146
150
|
elsif attribute =~ Mongoid::QueryStringInterface::OPERATOR_REGEX
|
147
151
|
"$#{$1}"
|
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 4
|
8
|
-
-
|
9
|
-
version: 0.4.
|
8
|
+
- 2
|
9
|
+
version: 0.4.2
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Vicente Mundim
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2011-06-
|
17
|
+
date: 2011-06-17 00:00:00 -03:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|