database_consistency 0.7.7 → 0.7.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f15517720ae0fd28c696d2dd01ca86902697f4a97186c89c3ba76e6b44d6cbf4
4
- data.tar.gz: b3e33ba7fdaf1708439b549d281e98ae64616b2f77c86c7268525425cc8c0ebc
3
+ metadata.gz: d3b93b80d81b10da730dbaf8cc523325150103fcae0f18ea4092baa03d8fb8ba
4
+ data.tar.gz: 67a8a38c922d359f11699b703a340489a866e573b8714f1848bfee7900ecb280
5
5
  SHA512:
6
- metadata.gz: 77422c0e1f2cf072e3bbf680112720d6d4672a92b58eebd47498e0a9695f127a0720620cbf6d49de1d376fb6dd4e07e03b005430ed86703e5d61e86e360e0e8f
7
- data.tar.gz: 5250dbd31fccde527c5520861d8ddfd5ada707d1484fc8bcf06b4954dd8792c903778e30967193db06d5664f20bc3b022107105db016bb17b2be6fcac5bc00cd
6
+ metadata.gz: 187968d380947ce829f765bac635720b959346c53b3ef81a99eadb1555395767d457fcbb5fd325010656b418867d1b916170cf0bc5cf265e69c9228e61d1a01e
7
+ data.tar.gz: 724d34742874b0b1f6e864dabe98624702409a26d39467292d64490d0757e4e4f7bfe428d0b6e9bf629ccac99abaaf1ba623cf674e1fd00215df5f39c200a512
@@ -13,7 +13,7 @@ module DatabaseConsistency
13
13
  # - there is no belongs_to association with given name
14
14
  # - belongs_to association is polymorphic
15
15
  def preconditions
16
- validator.kind == :presence && association && !association.polymorphic?
16
+ validator.kind == :presence && association && association.belongs_to? && !association.polymorphic?
17
17
  end
18
18
 
19
19
  # Table of possible statuses
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DatabaseConsistency
4
- VERSION = '0.7.7'
4
+ VERSION = '0.7.8'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: database_consistency
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.7
4
+ version: 0.7.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Evgeniy Demin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-29 00:00:00.000000000 Z
11
+ date: 2020-02-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord