foreign_key_validation 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZmUxYTU1NWRhZjEwYWQ1NDI2Mzk0MDFkMmZiZWViOTZmODc1NzA2MA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MjQzNDJhZTc4MzcwZjBhNmJmZmZkODQ5NDU4YmE5OWY1MmU5ZGU0Yg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
OWQ5NWQ5NzkyY2QxZjg3OTE0ZDFmYWZlNzlmYTc1MDJjZDc2ZjZmNTg3NmE1
|
10
|
+
NWE0Y2EzYWJiYWMyNjBiNjE1NWQ5MTkwOGFmYTQ1YWM5YjJmNjMyZTg3ZDFj
|
11
|
+
ZjM5OTQ2MTU5NGJiYzIxZDA4OWNhNmM3MWQ5NDkzODNjYzRmYWU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YmQ2ODhmNTEyMjAwYTY4Zjg2MWJiOTMwNDYyNDQ0M2Y4NGZlODE1MDRiODZh
|
14
|
+
NmI2MTM3MmUxYWRlMzg4Y2JkYzQ3ZmI5ODQxNDc4ZWM1N2EyNzllMzBkYjUz
|
15
|
+
MDhiOTQwNmZkNDI4OWJlZmUxMDIzMTc0MGRlZWNiZDMxZjE3ZGU=
|
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.authors = ["Marcus Geißler"]
|
10
10
|
spec.email = ["marcus3006@gmail.com"]
|
11
11
|
spec.summary = %q{Protect the foreign keys in your Rails models.}
|
12
|
-
spec.description = %q{Protect the foreign keys in your Rails models
|
12
|
+
spec.description = %q{Protect the foreign keys in your Rails models by checking the user_id of self against the user_id of all relations.}
|
13
13
|
spec.homepage = "https://github.com/marcusg/foreign_key_validation"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
@@ -6,7 +6,7 @@ module ForeignKeyValidation
|
|
6
6
|
private
|
7
7
|
def validate_foreign_key(validate_against, relation)
|
8
8
|
if send(relation).send("#{validate_against}_id") != send("#{validate_against}_id")
|
9
|
-
errors.add(validate_against, "#{validate_against} of #{relation} does not match #{self.class.
|
9
|
+
errors.add(validate_against, "#{validate_against} of #{relation} does not match #{self.class.table_name} #{validate_against}")
|
10
10
|
end
|
11
11
|
end
|
12
12
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreign_key_validation
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marcus Geißler
|
@@ -94,7 +94,8 @@ dependencies:
|
|
94
94
|
- - ~>
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0.10'
|
97
|
-
description: Protect the foreign keys in your Rails models
|
97
|
+
description: Protect the foreign keys in your Rails models by checking the user_id
|
98
|
+
of self against the user_id of all relations.
|
98
99
|
email:
|
99
100
|
- marcus3006@gmail.com
|
100
101
|
executables: []
|