deleted_at 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/deleted_at/active_record/base.rb +10 -1
- data/lib/deleted_at/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e17a8a535128a81c7ec16565a2b802fdf28a1c57
|
4
|
+
data.tar.gz: 58a9620ae9c91547e0f2ea5d014786e8f45ca44d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 429ed024cbd541645286675af000761a22e337e221b22dce35ce55cc0c25e826648df941613a20d9ae8b1b47ee467ae007af255e98dd3541d71edcbd71aa8fe8
|
7
|
+
data.tar.gz: af8ea5ec6e38083de40b3a061e09ab1a357ba942851cd496597d932aaa04ce2176f40e58351144132a93771ae4fd7409b22fccaea2f322c8027494c1527898f0
|
@@ -17,6 +17,7 @@ module DeletedAt
|
|
17
17
|
end
|
18
18
|
end
|
19
19
|
alias_method_chain :create, :deleted_at
|
20
|
+
alias_method_chain :create!, :deleted_at
|
20
21
|
end
|
21
22
|
|
22
23
|
end
|
@@ -27,7 +28,15 @@ module DeletedAt
|
|
27
28
|
if archive_with_deleted_at?
|
28
29
|
const_get(:All).create_without_deleted_at(attributes, &block)
|
29
30
|
else
|
30
|
-
create_without_deleted_at
|
31
|
+
create_without_deleted_at(attributes, &block)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
def create_with_deleted_at!(attributes = nil, &block)
|
36
|
+
if archive_with_deleted_at?
|
37
|
+
const_get(:All).create_without_deleted_at!(attributes, &block)
|
38
|
+
else
|
39
|
+
create_without_deleted_at!(attributes, &block)
|
31
40
|
end
|
32
41
|
end
|
33
42
|
|
data/lib/deleted_at/version.rb
CHANGED