bulk_dependency_eraser 1.0.4 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bulk_dependency_eraser/builder.rb +6 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cbea15215c816eca6790c1d7c3cbf4f4f68534fc3ff18cc38e8c26dc7e94513d
|
4
|
+
data.tar.gz: 532a711c1290ea4fea4200acc75d9916eb18a2451207b89d1163372d7372028d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e5639d23e7fbad812f11db05ad4b4dc3e88cd8823b3623ec38c892ed144ca6002b2e6bf56a826cca62aa2e87312fc676ac0668d1d6301a66496f91a62c7896fe
|
7
|
+
data.tar.gz: 20f81c4ddae6e875de07849088493f21095a567ccf2e1e39bfe21bbe1486dbfaa76ad06bc53f247724ca0f5e79a7f7af699e480345c2b5a800f617c06bb83844
|
@@ -260,7 +260,7 @@ module BulkDependencyEraser
|
|
260
260
|
when 'ActiveRecord::Reflection::HasManyReflection'
|
261
261
|
association_parser_has_many(parent_class, query, query_ids, association_name, type)
|
262
262
|
when 'ActiveRecord::Reflection::HasOneReflection'
|
263
|
-
association_parser_has_many(parent_class, query, query_ids, association_name, type
|
263
|
+
association_parser_has_many(parent_class, query, query_ids, association_name, type)
|
264
264
|
when 'ActiveRecord::Reflection::BelongsToReflection'
|
265
265
|
if type == :nullify
|
266
266
|
report_error("#{parent_class.name}'s association '#{association_name}' - dependent 'nullify' invalid for 'belongs_to'")
|
@@ -347,10 +347,11 @@ module BulkDependencyEraser
|
|
347
347
|
assoc_query = assoc_query.where(specified_foreign_key.to_sym => query_ids)
|
348
348
|
end
|
349
349
|
|
350
|
-
#
|
351
|
-
if
|
352
|
-
|
353
|
-
|
350
|
+
# Works in theory for ONE record's has_one, but we're dealing with potentially many
|
351
|
+
# # Apply limit if has_one assocation (subset of has_many)
|
352
|
+
# if opts[:limit]
|
353
|
+
# assoc_query = assoc_query.limit(opts[:limit])
|
354
|
+
# end
|
354
355
|
|
355
356
|
if type == :delete
|
356
357
|
# Recursively call 'deletion_query_parser' on association query, to delete any if the assoc's dependencies
|