Skip to content

Extend ActiveRecordDependent cop

Max Orefice requested to merge morefice/extend-active-record-dependent-cop into master

Ref: gitlab-org/gitlab#352902 (closed)

What does this MR do and why?

Following up gitlab-org/gitlab!80992 (merged) where we documented this use case.

This MR extends our ActiveRecordDependent cop to allow dependent: :restrict_with_error when dealing with model having child associations with object storage data attached to it.

This was brought up by @ayufan when implementing this feature in GitLab in gitlab-org/gitlab!81415 (comment 859110983).

Merge request reports

Loading