zombie_record 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/gemfiles/rails4.0.gemfile.lock +1 -1
- data/gemfiles/rails4.1.gemfile.lock +1 -1
- data/gemfiles/rails4.2.gemfile.lock +1 -1
- data/lib/zombie_record/restorable.rb +4 -2
- data/lib/zombie_record/version.rb +1 -1
- data/zombie_record.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5fcd4f52b9d5d55985cfbdbe559120d7893df768
|
4
|
+
data.tar.gz: d2349915fe48d65dcd8c67e1a7ff4582023fbe5f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b8248ef72aee0d1b52a52559463f31f764a47438892636d60205aa9ac2ac81f747f0cd698074daed3374579d7ee4cc810ff4377e3933937cbd9a158310bc04ad
|
7
|
+
data.tar.gz: f3dbf5c2833aedb5996ee75ca47a58e2cdef2f2097e849c2999fc808bd0d0e51039d1863e68a2e34ffc9c686764720da97ab589fa76aa664c6f952e4243114e5
|
data/CHANGELOG.md
CHANGED
@@ -54,11 +54,13 @@ module ZombieRecord
|
|
54
54
|
# Override Rails' #destroy_row for soft-delete functionality
|
55
55
|
def destroy_row
|
56
56
|
time = current_time_from_proper_timezone
|
57
|
-
update_column(:deleted_at, time)
|
58
57
|
|
58
|
+
update_params = { deleted_at: time }
|
59
59
|
if self.class.column_names.include?("updated_at")
|
60
|
-
|
60
|
+
update_params[:updated_at] = time
|
61
61
|
end
|
62
|
+
|
63
|
+
update_columns(update_params)
|
62
64
|
end
|
63
65
|
|
64
66
|
def restore_associated_records!
|
data/zombie_record.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.email = ["dasch@zendesk.com"]
|
11
11
|
spec.description = %q{Allows restoring your Active Records from the dead!}
|
12
12
|
spec.summary = %q{Allows restoring your Active Records from the dead!}
|
13
|
-
spec.homepage = "https://github.com/
|
13
|
+
spec.homepage = "https://github.com/zendesk/zombie_record"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
16
16
|
spec.files = `git ls-files`.split($/)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zombie_record
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Schierbeck
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-04-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -149,7 +149,7 @@ files:
|
|
149
149
|
- spec/restorable_spec.rb
|
150
150
|
- spec/spec_helper.rb
|
151
151
|
- zombie_record.gemspec
|
152
|
-
homepage: https://github.com/
|
152
|
+
homepage: https://github.com/zendesk/zombie_record
|
153
153
|
licenses:
|
154
154
|
- MIT
|
155
155
|
metadata: {}
|
@@ -169,7 +169,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
169
169
|
version: '0'
|
170
170
|
requirements: []
|
171
171
|
rubyforge_project:
|
172
|
-
rubygems_version: 2.
|
172
|
+
rubygems_version: 2.4.5
|
173
173
|
signing_key:
|
174
174
|
specification_version: 4
|
175
175
|
summary: Allows restoring your Active Records from the dead!
|