odata-model 0.5.16 → 0.5.17

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 01e34e0a18e5eadb5b2b85752b06cb819ce8df8f
4
- data.tar.gz: b20729b4a93638e07e055e5d78f7f9f8e44f8632
3
+ metadata.gz: e8977c91a1477a037fa1c11304d27f1905878c65
4
+ data.tar.gz: 12e47015a6ef55e1ae46dd84c0f1e59787da99d4
5
5
  SHA512:
6
- metadata.gz: 327e539a3ae432ddcac979044933aa22e94bdc978130967ee51327ab7652214ffbaf4ac524c57ba302e1936457120b22d54bd6d6020d25b1245cfff9596f1503
7
- data.tar.gz: 4214282db7150b1e235f99e8b91c8b453549bb89390aae0af2db2dc6cb404a597725fdb59d027a5d1e71a109c08cfab93fff2d799a17a5cfe38b9a71e39a1223
6
+ metadata.gz: 1040af8022e03afe014c6f400503fadb3103b4498b820f829a8f2c68a9fbb1a1a330b3d8639d19087b191ce1553db36234e91d5a2749ee63f1baaec5fcfc49c7
7
+ data.tar.gz: a1b44844fb074dac5012ba8f32afcda1c1a17448c842f2b22a355a1f59323a0405ad6ceda58d50616d8263306501dc69e7af7e37aa8e3c6a1944d73829f6461c
@@ -24,10 +24,14 @@ module OData
24
24
  def where(argument)
25
25
  if argument.is_a?(Hash)
26
26
  argument.each do |property_name, value|
27
- self.where(property_name.to_sym).is(eq: value)
27
+ self.where(property_name).is(eq: value)
28
28
  end
29
29
  else
30
- @last_criteria = query[target.property_map[argument.to_sym]]
30
+ if argument.is_a?(String)
31
+ @last_criteria = query[argument]
32
+ else
33
+ @last_criteria = query[target.property_map[argument.to_sym]]
34
+ end
31
35
  end
32
36
 
33
37
  self
@@ -1,5 +1,5 @@
1
1
  module OData
2
2
  module Model
3
- VERSION = '0.5.16'
3
+ VERSION = '0.5.17'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: odata-model
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.16
4
+ version: 0.5.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Thompson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-24 00:00:00.000000000 Z
11
+ date: 2014-09-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler