invisible_record 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 83ac4450dcab5420d45df80a3b43cc4832c9aa65fd9d7203b8c5a7d2190bd591
4
- data.tar.gz: f3fe66959227813ce9f5e29c230ee385472aae5e041012b0e60033f88352ab9d
3
+ metadata.gz: 7ee54865fb6e434aab2b548042557c735a02ccef639c5baff053fd412751cfc8
4
+ data.tar.gz: e708423f48672b3bcec32c6c65219ce9e4adb0956ccf8bf7897ebfae7eb0190a
5
5
  SHA512:
6
- metadata.gz: e1a71ee0832cd81b8c00657f08ce83e3fa08ac412cdb562b2548c261f7720636f6a8e59a38f24912b1dc4daf8b1cb0274696ab42bcfa85392fbf55687330658f
7
- data.tar.gz: c5cd6aec9d2204a15b592938f12063231ecdd5f048a80683072a3ad43469a70231d945a184fc4031f44e63bda5b90582438f0e528d2371ce69484ea8b0ee656d
6
+ metadata.gz: f86c3168c0814c91e7d1871b829436b567aa0f2cf3fcef0b8ab548aeaea53cef360482388f248a43fa67b6325782ab1f2e6f7aaaadad05be8352191723a942eb
7
+ data.tar.gz: 5d4edb35801ce585c4f03b639f68b56d68b343f9b23ea887f88455f50633ff0e774cd8262cb8896d8d2a85f3f01923cca4549a4cfb0b189221ec08af3e84851e
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- invisible_record (0.1.2)
4
+ invisible_record (0.1.3)
5
5
  activemodel (>= 5)
6
6
  activerecord (>= 5)
7
7
 
@@ -21,8 +21,10 @@ module InvisibleRecord
21
21
  send(assign_timestamp, options[:datetime])
22
22
  end
23
23
 
24
- klass.define_method "soft_delete!" do |*_args|
25
- soft_delete
24
+ klass.define_method "soft_delete!" do |*args|
25
+ options = args.last || {}
26
+ options[:datetime] ||= DateTime.now
27
+ soft_delete(datetime: options[:datetime])
26
28
  save!
27
29
  end
28
30
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module InvisibleRecord
4
- VERSION = "0.1.2"
4
+ VERSION = "0.1.3"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: invisible_record
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Rejón
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-11-17 00:00:00.000000000 Z
11
+ date: 2021-11-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel