kono_utils 1.1.2 → 1.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2ee1d8ef6cecb19fd0fd47b24502e172675f7f35a6b74899a78ea4499b36169f
|
4
|
+
data.tar.gz: e1dbdc2f86b29b1bccdc17cf209e1eb76b55b41d238b946c1f8165dc5239ef2b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c313f3971a58eb2d98093ea758d735a4c4068c56994764b64ab00960ba5d3d30c33490a043dc4f9042e761b7bcb1942008d86ebb2d1155d5f584ca9f88c0cf75
|
7
|
+
data.tar.gz: 93769f645df6c1ee2c0a6ce1152c9fbf8b867786f63cbec5989d2ec2e87d2989137e37286cfb08ea1b4faba91ca6e0e7c5ad49f1814b1cb4b992512bd0e755c1
|
@@ -1,6 +1,5 @@
|
|
1
1
|
require 'active_support/concern'
|
2
2
|
|
3
|
-
|
4
3
|
module KonoUtils::Concerns
|
5
4
|
##
|
6
5
|
# Includendo questo modulo nell'application record, possiamo andare injettare metodi necessari per la gestione
|
@@ -38,11 +37,13 @@ module KonoUtils::Concerns
|
|
38
37
|
callback = "make_#{attr}".to_sym
|
39
38
|
attr_accessor attr
|
40
39
|
|
41
|
-
after_save callback
|
40
|
+
after_save callback
|
42
41
|
|
43
42
|
define_method(callback) do
|
44
|
-
if self.send(
|
45
|
-
self.send(field_name.to_sym).
|
43
|
+
if self.send(attr.to_sym) == '1'
|
44
|
+
if self.send(field_name.to_sym).attached?
|
45
|
+
self.send(field_name.to_sym).purge_later
|
46
|
+
end
|
46
47
|
end
|
47
48
|
end
|
48
49
|
|
data/lib/kono_utils/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kono_utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marino
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-02-
|
11
|
+
date: 2021-02-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionview
|