shadow_model 0.2.5 → 0.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e255572a7b0b5d218d46279a38b089b0b5f6558b
4
- data.tar.gz: 6d1886e2e310991e52706e123f84efd87efb61c7
3
+ metadata.gz: bf08bdba63148d597aa5e6715f84f653e08fe9f5
4
+ data.tar.gz: 38f161d7f1a5b3aa48177c26eb449de3b7f752bd
5
5
  SHA512:
6
- metadata.gz: 9849e048bd70790ec511a96b3bc4a90f0e7241bffc11464832fd4eb56886e79b156398ea6af164ecc2fa38d57533970b6faba7a0f8e298d6a07c27fecb83a911
7
- data.tar.gz: 32b0e4c220f0554258aa7739db64c6e92d38b9ae429f87e5b59ac1ef66584c207ef37be4e7e0f1ab3a022ad16b74298fa3adf81e619a2129ebb94a79ebe09dd1
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
@@ -1,3 +1,3 @@
1
1
  module ShadowModel
2
- VERSION = "0.2.5"
2
+ VERSION = "0.2.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shadow_model
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Weihu Chen