rescue_unique_constraint-cadetstar 1.6.2 → 1.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rescue_unique_constraint.rb +1 -1
- data/lib/rescue_unique_constraint/version.rb +1 -1
- 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: b4297629f2d719077d3c950e9db7c1b7d6ddbbd1e64d6bb0dba217f556aaa627
|
4
|
+
data.tar.gz: 58242cb76741a5b06d188b0e0904d4d848dc9824b368ce4c9dae7ec2aafdf903
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d7e563a08fd1f86f4f76a4233fd559644beebb10a0faf8d19cdd8e6a1dbb5a2deace76fcf829c7ebd700374c9739361195cadc69eb7de0e05d7a5d0fd8c71042
|
7
|
+
data.tar.gz: bba2ef2ca55db4ecd755312918e0110b5ad7679aa065b20157b408de3eba24fa6d9502eac03dc4a628f690f55ba756d22942522f0ac74ab04a03709741ab16d8
|
@@ -28,7 +28,7 @@ module RescueUniqueConstraint
|
|
28
28
|
rescue ActiveRecord::RecordNotUnique => e
|
29
29
|
self.class.index_rescue_handler.matching_indexes(e).each do |matching_index|
|
30
30
|
if matching_index.scope
|
31
|
-
errors.add(matching_index.field, :taken,
|
31
|
+
errors.add(matching_index.field, :taken, unique_scope: matching_index.scope)
|
32
32
|
else
|
33
33
|
errors.add(matching_index.field, :taken)
|
34
34
|
end
|