rubocop-rails 2.12.3 → 2.12.4

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: f6f12cb9a10c2b1cf1ffe2a4713ccfdd4d88885378bde05d3988d829bf73218d
4
- data.tar.gz: e60c60867234af9be31f066397aa23ddfedf8b167fa86269761717a81ad89f75
3
+ metadata.gz: 7c247cc795386a013c8f1a9dd7a76a08ef8fbd3c729ebe69e2f99bcb28a7baf6
4
+ data.tar.gz: f85139a9ef4a5f1666672431285e6d34ca9a8c0a367bf6c1e2b8ed2d3d0acf63
5
5
  SHA512:
6
- metadata.gz: b002f9f18331d8f4fe34f69dd0226e2ae607e632360e370dec3b5f2df39e4c1d10426ca5b9a574f83d579a841e705cb8b2332b6a2956dc76f6b130d56f824b30
7
- data.tar.gz: 5e84d9ed3b6a8991fa8b905d38e30a6c26828d8b9a73b0db552485872b0a31bff17aab3b6109170a98950b132eb1929be16552b27143f56567daf4e2ef9e7d16
6
+ metadata.gz: cd4893d903809e187a9094f84a14209aecfc931e4773df64e1c5a05c94fce22305ca0b0c899881545e697ceae8c6facb3400d0dc41415fed57a3b07244b7fdff
7
+ data.tar.gz: 91832638f61072047b0cf11b300d7be679a8fc7f708dc47cb5769eb1cd7852c8caf70452d6297cca122af4a53fd0599605d7221a8fc647e96352934fb0828684
@@ -8,10 +8,10 @@ module RuboCop
8
8
  #
9
9
  # @example
10
10
  # #bad
11
- # Book.update_attributes!(author: 'Alice')
11
+ # book.update_attributes!(author: 'Alice')
12
12
  #
13
13
  # #good
14
- # Book.update!(author: 'Alice')
14
+ # book.update!(author: 'Alice')
15
15
  class ActiveRecordAliases < Base
16
16
  extend AutoCorrector
17
17
 
@@ -55,6 +55,8 @@ module RuboCop
55
55
  end
56
56
 
57
57
  def active_model_error?(node)
58
+ return false if node.nil?
59
+
58
60
  node.send_type? && node.method?(:errors)
59
61
  end
60
62
  end
@@ -4,7 +4,7 @@ module RuboCop
4
4
  module Rails
5
5
  # This module holds the RuboCop Rails version information.
6
6
  module Version
7
- STRING = '2.12.3'
7
+ STRING = '2.12.4'
8
8
 
9
9
  def self.document_version
10
10
  STRING.match('\d+\.\d+').to_s
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.12.3
4
+ version: 2.12.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bozhidar Batsov
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2021-10-06 00:00:00.000000000 Z
13
+ date: 2021-10-15 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport