Skip to content

DefinitionProxy#method_missing: Forward given block to #association#1579

Merged
vburzynski merged 1 commit intothoughtbot:mainfrom
grekko:warn_user_about_mixed_assocation_definition
Mar 27, 2026
Merged

DefinitionProxy#method_missing: Forward given block to #association#1579
vburzynski merged 1 commit intothoughtbot:mainfrom
grekko:warn_user_about_mixed_assocation_definition

Conversation

@grekko
Copy link
Copy Markdown
Contributor

@grekko grekko commented Jun 13, 2023

Replacement for the prematurely closed PR #1518

Why:

When defining an association the block-argument will be ignored when also providing a factory-key on the association definition.

This behaviour might be unexpected, so we should raise an error that the passed block is unexpected/ignored.

Fixes thoughtbot#1503

Why:
----
When defining an association the block-argument will be ignored when also
providing a `factory`-key on the association definition.

This behaviour might be unexpected, so we should raise an error that the
passed block is unexpected/ignored.
@vburzynski vburzynski force-pushed the warn_user_about_mixed_assocation_definition branch from 699759f to a06cfa4 Compare March 27, 2026 21:32
@vburzynski vburzynski force-pushed the warn_user_about_mixed_assocation_definition branch from a06cfa4 to dca8384 Compare March 27, 2026 21:34
@vburzynski vburzynski merged commit a4e5ab7 into thoughtbot:main Mar 27, 2026
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants