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

Avoid extra calls to to_s #31821

Merged
merged 1 commit into from
Jan 29, 2018
Merged

Conversation

composerinteralia
Copy link
Member

@composerinteralia composerinteralia commented Jan 29, 2018

With #31615 type_for_attribute accepts
a symbol as well as a string. has_attribute? and attribute_alias
also accept either. Since these methods already call to_s on the argument,
we no longer need to do that at the call site.

With rails#31615 `type_for_attribute` accepts either
a symbol as well as a string. `has_attribute?` and `attribute_alias`
also accept either. Since these methods call `to_s` on the argument,
we no longer need to do that at the call site.
@rails-bot
Copy link

r? @pixeltrix

(@rails-bot has picked a reviewer for you, use r? to override)

@georgeclaghorn georgeclaghorn merged commit ca1d13a into rails:master Jan 29, 2018
@composerinteralia composerinteralia deleted the extra-to_s branch January 29, 2018 21:05
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.

None yet

4 participants