Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix cop RedundantPresenceValidationOnBelongs #12380

Commits on Apr 15, 2024

  1. Fix cop RedundantPresenceValidationOnBelongs

    - presence: true is redundant since Rails 5.0 BUT applies
      with new default config of
      belongs_to_required_by_default to true
      Lots of files with belongs_to_required_by_default = false
      (backward compatibility)
      So: deleting this setting implies to adding optional: true
      on belongs_to relations where there is no explicit check for presence.
      And also to delete redundant presence: true
      The implicit becomes the explicit and vice versa
    - updated toto list
    cyrillefr committed Apr 15, 2024
    Configuration menu
    Copy the full SHA
    37814c4 View commit details
    Browse the repository at this point in the history