foreign_key_validation 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZjczM2MxZDBjMGMyNzYxZDNiZTM1YTliYTZjOTg2MDk4MjcyY2UyNA==
4
+ ZmUxYTU1NWRhZjEwYWQ1NDI2Mzk0MDFkMmZiZWViOTZmODc1NzA2MA==
5
5
  data.tar.gz: !binary |-
6
- MTljYzJiY2IwOWM5NzY5OTU0M2FkMzNhODRmNWM3NDYyYTY4MDEzYQ==
6
+ MjQzNDJhZTc4MzcwZjBhNmJmZmZkODQ5NDU4YmE5OWY1MmU5ZGU0Yg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- Mjc0OTVlOGUyZWFkOTQ3ODE0OGFkNjJjZTMxMDdjYjc5ODhhMDA0NTFkZTE5
10
- OGUxODgwNTRlYTAxM2ViNDRkZDMyZmYzNzMzMGVkZWFlMGZmOTY5OGQyM2Ji
11
- ZWY4ZDU2NWM2MWNmMDJmY2MzMGQ2OWMzYjE0OGE5NDE0YjU2N2Q=
9
+ OWQ5NWQ5NzkyY2QxZjg3OTE0ZDFmYWZlNzlmYTc1MDJjZDc2ZjZmNTg3NmE1
10
+ NWE0Y2EzYWJiYWMyNjBiNjE1NWQ5MTkwOGFmYTQ1YWM5YjJmNjMyZTg3ZDFj
11
+ ZjM5OTQ2MTU5NGJiYzIxZDA4OWNhNmM3MWQ5NDkzODNjYzRmYWU=
12
12
  data.tar.gz: !binary |-
13
- NmE5NzEyODJlNGMzNmVkYWI2ZDAwMTFiYTRkODMyZWExYzc2YWE0ZDVlYzEw
14
- MzRiZGFkMzY3MzQxN2Y3ODg4ZDg5MmM5OWI3OGM0MjAwMDM3ZWEyZGM3N2Qw
15
- M2IzM2E0ZDg0NmZhMDQyMGIwZWUxYjdkOTIwYjI0MmQwODVkYzA=
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. Really.}
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.name.tableize} #{validate_against}")
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
@@ -1,3 +1,3 @@
1
1
  module ForeignKeyValidation
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  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
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. Really.
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: []