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

Rename method_missing_target to target #35961

Merged
merged 2 commits into from Apr 13, 2019

Conversation

shioyama
Copy link
Contributor

The term method_missing_target is extremely misleading and confusing since by far the most frequent caller for these "handler methods" (attribute_was, etc.) are methods defined from columns in the schema (i.e. title_was, etc.), and not method_missing.

The target of matchers is used in two contexts: to define attribute
methods which dispatch to handlers like attribute_was, and to match
method calls in method_missing and dispatch to those same handler
methods.

Only in the latter context does the term "method_missing_target" make
any sense; in the former context it is just confusing. "target" is not
ideal as a term but at least it avoids this confusion.
Most of the time, these methods are called from actual methods defined
from columns in the schema, not from method_missing, so the current
wording is misleading.
@shioyama shioyama force-pushed the rename_method_missing_target branch from ce52d6d to c9d7517 Compare April 13, 2019 02:12
@kamipo kamipo merged commit a474498 into rails:master Apr 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants