Skip to content

Commit

Permalink
Enable Lint/SafeNavigationChain rubocop cop
Browse files Browse the repository at this point in the history
  • Loading branch information
Earlopain committed Jan 8, 2024
1 parent fa84182 commit 0a9dcb0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,9 @@ Lint/InterpolationCheck:
Exclude:
- '**/test/**/*'

Lint/SafeNavigationChain:
Enabled: true

Style/EvalWithLocation:
Enabled: true
Exclude:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def build_decrypt_attribute_assignments
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
Expand Down

0 comments on commit 0a9dcb0

Please sign in to comment.