shadow_model 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/shadow_model/model_extension.rb +2 -0
- data/lib/shadow_model/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bf08bdba63148d597aa5e6715f84f653e08fe9f5
|
4
|
+
data.tar.gz: 38f161d7f1a5b3aa48177c26eb449de3b7f752bd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 58ad5075998f12a353e940eacfdd413b2e37645fa8a929803057bc2855eaa172179fa7a1771a27b150e60b203dea331ddcf229fb303bb8271231c08a13997614
|
7
|
+
data.tar.gz: b51695d413eeae6c9e723560b742801b9ccd7223366884970ad8344710c97e80393b9a49527d26e9b43b37cb5b24d881814293063d3a66a8ad03a0d90e847c4a
|
@@ -75,6 +75,8 @@ module ShadowModel
|
|
75
75
|
def instantiate_shadow_model(shadow_data)
|
76
76
|
instance = self.new
|
77
77
|
instance.instance_variable_set(:@shadow_model, true)
|
78
|
+
instance.instance_variable_set(:@persisted, true) # rails3
|
79
|
+
instance.instance_variable_set(:@new_record, false) # rails4
|
78
80
|
instance.send(:shadow_data=, shadow_data)
|
79
81
|
instance.readonly!
|
80
82
|
instance
|
data/lib/shadow_model/version.rb
CHANGED