superstore 1.0.8 → 1.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/superstore/persistence.rb +8 -2
- data/superstore.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 14e6e854d00b71d3adc4c90c9a22a2ad037804f7
|
4
|
+
data.tar.gz: b93c4c751c9878bf0ffd5f9ad820318c7a4b516e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ffcc9039341bf692f33ace4bb30da758a24dc39c3f41037a794ae7a3ebe289a7136b7bcb604377bd99b74aa9f50e000c154166d574b784b33d68ad48d26631b3
|
7
|
+
data.tar.gz: a697096203de501f04f73fa73194ccf8c2e0b09f03e139dfd4a9152c1cfab47be90fd265cc064c45ae7b61430631ab3cf64b77a9c2ed4746ece148607ba84ee5
|
@@ -42,7 +42,7 @@ module Superstore
|
|
42
42
|
object.instance_variable_set("@id", id) if id
|
43
43
|
object.instance_variable_set("@new_record", false)
|
44
44
|
object.instance_variable_set("@destroyed", false)
|
45
|
-
object.instance_variable_set("@attributes", typecast_persisted_attributes(
|
45
|
+
object.instance_variable_set("@attributes", typecast_persisted_attributes(attributes))
|
46
46
|
end
|
47
47
|
end
|
48
48
|
|
@@ -64,7 +64,13 @@ module Superstore
|
|
64
64
|
column_names.map { |name| "'#{name}'" }
|
65
65
|
end
|
66
66
|
|
67
|
-
def typecast_persisted_attributes(
|
67
|
+
def typecast_persisted_attributes(attributes)
|
68
|
+
typecast_persisted_attributes! attributes.dup
|
69
|
+
end
|
70
|
+
|
71
|
+
def typecast_persisted_attributes!(attributes)
|
72
|
+
attributes = attributes.dup
|
73
|
+
|
68
74
|
attributes.each do |key, value|
|
69
75
|
if definition = attribute_definitions[key]
|
70
76
|
attributes[key] = definition.instantiate(value)
|
data/superstore.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: superstore
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Koziarski
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-07-
|
12
|
+
date: 2014-07-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activemodel
|