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

Alias ActionController::Parameters except as without #47687

Merged
merged 1 commit into from
Mar 29, 2023

Conversation

hidde-jan
Copy link
Contributor

Motivation / Background

ActionController::Parameters acts in many ways as a HashWithIndifferentAccess. However, it is missing the without alias for the except method, which is present on the underlying parameters hash. This difference in behavior is confusing.

This Pull Request has been created because it adds the missing alias.

Detail

This Pull Request changes the ActionController::Parameters class by adding without as an alias of except.

Checklist

Before submitting the PR make sure the following are checked:

  • This Pull Request is related to one change. Changes that are unrelated should be opened in separate PRs.
  • Commit message has a detailed description of what changed and why. If this PR fixes a related issue include it in the commit message. Ex: [Fix #issue-number]
  • Tests are added or updated if you fix a bug or add a feature.
  • CHANGELOG files are updated for the changed libraries if there is a behavior change or additional feature. Minor bug fixes and documentation changes should not be included.

@rails-bot rails-bot bot added the actionpack label Mar 16, 2023
@byroot
Copy link
Member

byroot commented Mar 17, 2023

I'm 👍 with this, but you need to squash your commits and fix the linter issue.

@zzak
Copy link
Member

zzak commented Mar 28, 2023

@hidde-jan The linter failure should be fixed if you can rebase and squash, everything should be fine 🙏

@hidde-jan hidde-jan force-pushed the alias-parameters-except-as-without branch from df2ac2c to 603b5cd Compare March 29, 2023 08:57
@hidde-jan
Copy link
Contributor Author

@zzak squashed and rebased, and linter is happy.

@byroot byroot merged commit 33e1a89 into rails:main Mar 29, 2023
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

3 participants