Skip to content

Add specs to prevent `through:` associations from being overridden

What does this MR do and why?

The change prevents overriding of has_many through: or has_one through: associations to avoid data loss and other potential issues by introducing a new spec to keep a check on this.

Also adds documentation detailing the cons of overriding such associations.

Specs fail like this, when an through: is overridden and not temporarily allowed:

Screenshot_2023-09-12_at_10.54.30_AM

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #424536 (closed)

Edited by Manoj M J

Merge request reports

Loading