mirror of https://github.com/rails/rails
Merge pull request #50655 from Earlopain/enable-lint-safe-navigation-chain
Enable `Lint/SafeNavigationChain` rubocop cop
This commit is contained in:
commit
c003ed7c69
|
@ -272,6 +272,9 @@ Lint/InterpolationCheck:
|
|||
Exclude:
|
||||
- '**/test/**/*'
|
||||
|
||||
Lint/SafeNavigationChain:
|
||||
Enabled: true
|
||||
|
||||
Style/EvalWithLocation:
|
||||
Enabled: true
|
||||
Exclude:
|
||||
|
|
|
@ -221,7 +221,7 @@ module ActiveRecord
|
|||
end
|
||||
|
||||
def cant_modify_encrypted_attributes_when_frozen
|
||||
self.class&.encrypted_attributes.each do |attribute|
|
||||
self.class.encrypted_attributes.each do |attribute|
|
||||
errors.add(attribute.to_sym, "can't be modified because it is encrypted") if changed_attributes.include?(attribute)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue