active_record_compose 0.2.0 → 0.2.1
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 +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/active_record_compose/model.rb +6 -0
- data/lib/active_record_compose/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0c3cb23854b3caafb1f25c297b1d12fb7693c5af5d8e7f917ce3117e5334afa0
|
|
4
|
+
data.tar.gz: fe905d6071cc4c491fadd68c35b36540b57881d78b6c398acaf2e573d766912c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6a8850ebb01e4705f658bbc65c2cc10366214a2c34787b3d6c6228c34ac405aa00b548212747ef5429fe26eabe1633bf5af9d1019bd95094c1cfd79897811d4c
|
|
7
|
+
data.tar.gz: a531f7980d9d5ed490aa8c35927176511db6ff81f81009d02ac4121a04abe57efd6ac4dc5db8f353b4ef03c18214c73f246a1c6c8e43e235d1065d436538de31
|
data/CHANGELOG.md
CHANGED
|
@@ -34,6 +34,8 @@ module ActiveRecordCompose
|
|
|
34
34
|
return false if invalid?
|
|
35
35
|
|
|
36
36
|
save_in_transaction { save_models(bang: false) }
|
|
37
|
+
rescue ActiveRecord::RecordInvalid
|
|
38
|
+
false
|
|
37
39
|
end
|
|
38
40
|
|
|
39
41
|
# Save the models that exist in models.
|
|
@@ -77,6 +79,8 @@ module ActiveRecordCompose
|
|
|
77
79
|
return false if invalid?
|
|
78
80
|
|
|
79
81
|
save_in_transaction { run_callbacks(:create) { save_models(bang: false) } }
|
|
82
|
+
rescue ActiveRecord::RecordInvalid
|
|
83
|
+
false
|
|
80
84
|
end
|
|
81
85
|
|
|
82
86
|
# Behavior is same to `#create`, but raises an exception prematurely on failure.
|
|
@@ -118,6 +122,8 @@ module ActiveRecordCompose
|
|
|
118
122
|
return false if invalid?
|
|
119
123
|
|
|
120
124
|
save_in_transaction { run_callbacks(:update) { save_models(bang: false) } }
|
|
125
|
+
rescue ActiveRecord::RecordInvalid
|
|
126
|
+
false
|
|
121
127
|
end
|
|
122
128
|
|
|
123
129
|
# Behavior is same to `#update`, but raises an exception prematurely on failure.
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: active_record_compose
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- hamajyotan
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2024-01-
|
|
11
|
+
date: 2024-01-31 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activerecord
|
|
@@ -51,7 +51,7 @@ metadata:
|
|
|
51
51
|
homepage_uri: https://github.com/hamajyotan/active_record_compose
|
|
52
52
|
source_code_uri: https://github.com/hamajyotan/active_record_compose
|
|
53
53
|
changelog_uri: https://github.com/hamajyotan/active_record_compose/blob/main/CHANGELOG.md
|
|
54
|
-
documentation_uri: https://www.rubydoc.info/gems/active_record_compose/0.2.
|
|
54
|
+
documentation_uri: https://www.rubydoc.info/gems/active_record_compose/0.2.1
|
|
55
55
|
rubygems_mfa_required: 'true'
|
|
56
56
|
post_install_message:
|
|
57
57
|
rdoc_options: []
|