mince_data_model 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/data_store_config.rb +2 -2
- data/lib/mince_data_model.rb +5 -1
- data/lib/mince_data_model/version.rb +1 -1
- metadata +2 -2
data/lib/data_store_config.rb
CHANGED
data/lib/mince_data_model.rb
CHANGED
@@ -103,7 +103,7 @@ module MinceDataModel
|
|
103
103
|
|
104
104
|
def translate_from_data_store(hash)
|
105
105
|
if hash
|
106
|
-
hash["id"] = hash[
|
106
|
+
hash["id"] = hash[primary_key_identifier] if hash[primary_key_identifier]
|
107
107
|
HashWithIndifferentAccess.new hash
|
108
108
|
end
|
109
109
|
end
|
@@ -114,6 +114,10 @@ module MinceDataModel
|
|
114
114
|
|
115
115
|
private
|
116
116
|
|
117
|
+
def primary_key_identifier
|
118
|
+
@primary_key_identifier ||= data_store.primary_key_identifier
|
119
|
+
end
|
120
|
+
|
117
121
|
def set_data_collection(collection_name)
|
118
122
|
@data_collection = collection_name
|
119
123
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mince_data_model
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2012-08-
|
14
|
+
date: 2012-08-31 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: rspec
|