mongoid_query_string_interface 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -58,7 +58,7 @@ module Mongoid
58
58
 
59
59
  attribute = attribute_from(key)
60
60
  operator = operator_from(key)
61
- value = parse_value(value, operator)
61
+ value = parse_value(unescape(value), operator)
62
62
 
63
63
  if operator
64
64
  filter = { operator => value }
@@ -89,6 +89,10 @@ module Mongoid
89
89
  "$#{match[1]}".to_sym
90
90
  end
91
91
  end
92
+
93
+ def unescape(value)
94
+ URI.unescape(value)
95
+ end
92
96
 
93
97
  def parse_value(value, operator)
94
98
  parse_date(value) or parse_integer(value) or parse_float(value) or parse_array(value, operator) or parse_regex(value) or value
data/lib/version.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
  module Mongoid #:nodoc
3
3
  module QueryStringInterface #:nodoc
4
- VERSION = "0.1.5"
4
+ VERSION = "0.1.6"
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongoid_query_string_interface
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 23
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 5
10
- version: 0.1.5
9
+ - 6
10
+ version: 0.1.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Vicente Mundim