active_record-nested_attributes-destroy_if 0.3.2 → 0.3.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: bb8fdfa9077353df3588817a550c8d311b8b6827337f3e76b7dcaa7f6f2cd1d7
|
4
|
+
data.tar.gz: 25205f8a4dda44acb15092e26304c7b7394ce736468f1dcaa139d7e3f235c463
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 41c6e6afa3e0b47092c144207586bc3ed0e0b065237e79db3653907b9ff9ee4c93dd3f87287c8ed77f6bd5dd052cf9d16a41eec4d3d4f985cf7d4a8be7d69ef6
|
7
|
+
data.tar.gz: 5b5d1274cb6a4609a920877b65a8f801f690da96439712683ee935675c15c81bfdb357fbeb5a3c4f5ed8df5e3b621365b4de3042acad3bbc0d645092a0b9c3fc
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# ActiveRecord::NestedAttributes::DestroyIf
|
2
2
|
|
3
|
-
[![
|
3
|
+
[![CI Status](https://github.com/botandrose/active_record-nested_attributes-destroy_if/workflows/CI/badge.svg?branch=master)](https://github.com/botandrose/active_record-nested_attributes-destroy_if/actions?query=workflow%3ACI+branch%3Amaster)
|
4
4
|
|
5
5
|
Adds a `:destroy_if` option to `.accepts_nested_attributes_for`, which is basically a stronger version of `:reject_if` that also destroys existing records.
|
6
6
|
|
@@ -114,7 +114,7 @@ module ActiveRecord
|
|
114
114
|
if target_record
|
115
115
|
existing_record = target_record
|
116
116
|
else
|
117
|
-
association.add_to_target(existing_record, :
|
117
|
+
association.add_to_target(existing_record, skip_callbacks: true)
|
118
118
|
end
|
119
119
|
|
120
120
|
assign_to_or_mark_for_destruction(existing_record, attributes, options[:allow_destroy], options[:destroy_if])
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_record-nested_attributes-destroy_if
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Micah Geisel
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
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
|