culturecode_stagehand 0.7.4 → 0.7.5

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: 418bc046d43d494e0048ac41bd14449d3011d54b
4
- data.tar.gz: c66d323bfd5cee0d5d1906b1b3cc651802faba11
3
+ metadata.gz: c1d82070e88fb250fe52952d5db66babade39210
4
+ data.tar.gz: 48d689e4fc9f16a0f2d092e78ea560fc07ed4dd2
5
5
  SHA512:
6
- metadata.gz: ba7618eb96a1f92b3f394fdfb784e2af18ba6368ac6ce01a40ef0de8099a86c94f2beb5a7d74a0c18ebcfb448ceec60278e2a3fc6d514139d5832460c0f96001
7
- data.tar.gz: 3d9fdf1694447e88871c1a4249bc8efb6c4f0ee7f5abc7db2690dde40eea0ae852ccc6f72e59986ca7c731c3d86b254181ed5306658960952c88b034b5257cc4
6
+ metadata.gz: 65c76605fc9f8398e1c292e162cba4b671c72c0d245cd5814e57aa52506255c787e380120ecc7fc31d6cec76aa22f69890ee40f9c879540e7d5caec24d54c571
7
+ data.tar.gz: c1fb3c7ff0a35cb960ba05a95ca797187f248055732a487719d6a2957c30a01716cf38e8dacafde6f1e0a7bcf44820d33b8e0669107790c59138a9cb3f48f102
@@ -70,7 +70,7 @@ module Stagehand
70
70
  end
71
71
 
72
72
  def record
73
- @record ||= delete_operation? ? build_production_record : record_class.find_by_id(record_id) if content_operation?
73
+ @record ||= delete_operation? ? build_deleted_record : record_class.find_by_id(record_id) if content_operation?
74
74
  end
75
75
 
76
76
  def control_operation?
@@ -119,14 +119,16 @@ module Stagehand
119
119
 
120
120
  private
121
121
 
122
- def build_production_record
122
+ def build_deleted_record
123
123
  production_record = Stagehand::Production.find(record_id, table_name)
124
124
  return unless production_record
125
125
 
126
- production_record = record_class.new(production_record.attributes)
127
- production_record.readonly!
126
+ deleted_record = record_class.new(production_record.attributes)
127
+ deleted_record.readonly!
128
+ deleted_record.instance_variable_set(:@new_record, false)
129
+ deleted_record.instance_variable_set(:@destroyed, true)
128
130
 
129
- return production_record
131
+ return deleted_record
130
132
  end
131
133
  end
132
134
  end
@@ -1,3 +1,3 @@
1
1
  module Stagehand
2
- VERSION = "0.7.4"
2
+ VERSION = "0.7.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: culturecode_stagehand
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.4
4
+ version: 0.7.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nicholas Jakobsen
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-06-15 00:00:00.000000000 Z
12
+ date: 2016-06-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -108,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
108
108
  version: '0'
109
109
  requirements: []
110
110
  rubyforge_project:
111
- rubygems_version: 2.5.1
111
+ rubygems_version: 2.4.5.1
112
112
  signing_key:
113
113
  specification_version: 4
114
114
  summary: Simplify the management of a sandbox database that can sync content to a