active_record-nested_attributes-destroy_if 0.3.2 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +2 -2
- data/Appraisals +8 -8
- data/README.md +1 -1
- data/active_record-nested_attributes-destroy_if.gemspec +1 -1
- data/gemfiles/{rails_6.0.gemfile → rails_7.2.gemfile} +1 -1
- data/gemfiles/{rails_6.1.gemfile → rails_8.0.gemfile} +1 -1
- data/lib/active_record/nested_attributes/destroy_if/version.rb +1 -1
- data/lib/active_record/nested_attributes/destroy_if.rb +1 -1
- metadata +5 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8ce2238a64fac56a12858dbc55953731350cc452a4451f9dc48ece7c7120837f
|
4
|
+
data.tar.gz: a168569d4c31e9c65709546e946717ba23f6a3e08fd6031fd8d7fa57b5e31ab0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b71cec4d31def06961bd157936dbdecef01ad0ae20479fe4efe2108b8c7d6f145b6b6abc0f79e3fcb42d29cda409887ba43666ba8b259fa9cf0d54973fb7555c
|
7
|
+
data.tar.gz: c62be668dc9e93f18c24cc541e81938fee7547ecb90e01361206ecabda926c7d003b393f3dfd25ea569354a4564a0d01a2a40be5e4d3144d8949a4944b1ad402
|
data/.github/workflows/ci.yml
CHANGED
@@ -5,8 +5,8 @@ jobs:
|
|
5
5
|
strategy:
|
6
6
|
fail-fast: false
|
7
7
|
matrix:
|
8
|
-
gemfile: [
|
9
|
-
ruby: [
|
8
|
+
gemfile: [ rails_7.0, rails_7.1, rails_7.2, rails_8.0 ]
|
9
|
+
ruby: [ 3.1, 3.2, 3.3 ]
|
10
10
|
|
11
11
|
runs-on: ubuntu-latest
|
12
12
|
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
|
data/Appraisals
CHANGED
@@ -1,11 +1,3 @@
|
|
1
|
-
appraise "rails-6.0" do
|
2
|
-
gem "rails", "~>6.0.0"
|
3
|
-
end
|
4
|
-
|
5
|
-
appraise "rails-6.1" do
|
6
|
-
gem "rails", "~>6.1.0"
|
7
|
-
end
|
8
|
-
|
9
1
|
appraise "rails-7.0" do
|
10
2
|
gem "rails", "~>7.0.0"
|
11
3
|
end
|
@@ -14,3 +6,11 @@ appraise "rails-7.1" do
|
|
14
6
|
gem "rails", "~>7.1.0"
|
15
7
|
end
|
16
8
|
|
9
|
+
appraise "rails-7.2" do
|
10
|
+
gem "rails", "~>7.2.0"
|
11
|
+
end
|
12
|
+
|
13
|
+
appraise "rails-8.0" do
|
14
|
+
gem "rails", "~>8.0.0"
|
15
|
+
end
|
16
|
+
|
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
|
|
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
24
24
|
spec.require_paths = ["lib"]
|
25
25
|
|
26
|
-
spec.add_dependency "activerecord", ">=6.0"
|
26
|
+
spec.add_dependency "activerecord", ">=6.0"
|
27
27
|
|
28
28
|
spec.add_development_dependency "bundler"
|
29
29
|
spec.add_development_dependency "appraisal"
|
@@ -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.4
|
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-
|
11
|
+
date: 2024-11-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -17,9 +17,6 @@ dependencies:
|
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '6.0'
|
20
|
-
- - "<"
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: '7.2'
|
23
20
|
type: :runtime
|
24
21
|
prerelease: false
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -27,9 +24,6 @@ dependencies:
|
|
27
24
|
- - ">="
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: '6.0'
|
30
|
-
- - "<"
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
version: '7.2'
|
33
27
|
- !ruby/object:Gem::Dependency
|
34
28
|
name: bundler
|
35
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -134,10 +128,10 @@ files:
|
|
134
128
|
- bin/console
|
135
129
|
- bin/setup
|
136
130
|
- gemfiles/.bundle/config
|
137
|
-
- gemfiles/rails_6.0.gemfile
|
138
|
-
- gemfiles/rails_6.1.gemfile
|
139
131
|
- gemfiles/rails_7.0.gemfile
|
140
132
|
- gemfiles/rails_7.1.gemfile
|
133
|
+
- gemfiles/rails_7.2.gemfile
|
134
|
+
- gemfiles/rails_8.0.gemfile
|
141
135
|
- lib/active_record/nested_attributes/destroy_if.rb
|
142
136
|
- lib/active_record/nested_attributes/destroy_if/version.rb
|
143
137
|
homepage: https://github.com/botandrose/active_record-nested_attributes-destroy_if
|
@@ -159,7 +153,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
159
153
|
- !ruby/object:Gem::Version
|
160
154
|
version: '0'
|
161
155
|
requirements: []
|
162
|
-
rubygems_version: 3.5.
|
156
|
+
rubygems_version: 3.5.11
|
163
157
|
signing_key:
|
164
158
|
specification_version: 4
|
165
159
|
summary: Adds :destroy_if option to accepts_nested_attributes_for
|