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

Update guides: Replace filter with action callback [ci skip] #51645

Conversation

notapatch
Copy link
Contributor

Motivation / Background

Rails 4.2 onwards replaced filter with action callback. However, the term has remained in the rails guides and this PR fixes this.

Term used is "action callbacks" as this was used in the changelog:

Deprecate all *_filter callbacks in favor of *_action callbacks.
Original Change

Types of change:

  • Filter(s) => Action callback(s)
  • Generalized the word "Action callbacks" as it is longer.
  • actions => "controller actions" to make "controller actions" more distinct from "action callbacks".

Checklist

Before submitting the PR make sure the following are checked:

  • This Pull Request is related to one change. Unrelated changes 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 docs label Apr 23, 2024
Copy link
Member

@carlosantoniodasilva carlosantoniodasilva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the updates, I think it makes sense to try to remove the relation to "filter" where possible. (note that we don't need to fully eliminate it, as they are somewhat replaceable)

I had a few small suggestions below, let me know what you think. Also, please make sure to squash any additional commits down to one by the end, before we can consider merging. Thanks again.

guides/source/action_controller_overview.md Outdated Show resolved Hide resolved
guides/source/action_controller_overview.md Outdated Show resolved Hide resolved
guides/source/action_controller_overview.md Outdated Show resolved Hide resolved
guides/source/action_controller_overview.md Outdated Show resolved Hide resolved
guides/source/action_controller_overview.md Outdated Show resolved Hide resolved
@notapatch notapatch force-pushed the pr-guides-acion-controller-action-callbacks branch from d846dfc to b33597a Compare April 23, 2024 14:23
@notapatch
Copy link
Contributor Author

Hi @carlosantoniodasilva

Agree with all those changes and I've updated the PR per your suggestions.

Everything is green/passing and in a single commit!

Copy link
Member

@carlosantoniodasilva carlosantoniodasilva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look great, but I did miss one tweak in my previous pass 🙈 , if you don't mind fixing that one up, and I'll merge. Thanks again.

guides/source/action_controller_overview.md Outdated Show resolved Hide resolved
Rails 4.2 onwards replaced filter with action callback. However,
the term has remained in the rails guides and this PR fixes this.

Term used is "action callbacks" as this was used in the changelog:

> Deprecate all *_filter callbacks in favor of *_action callbacks.
[Original Change](rails@489a8f2)

Types of change:
- Filter(s) => Action callback(s)
- Generalized the word "Action callbacks" as it is longer.
- actions => "controller actions" to make "controller actions"
  more distinct from "action callbacks".
@notapatch notapatch force-pushed the pr-guides-acion-controller-action-callbacks branch from b33597a to 66bc210 Compare April 23, 2024 14:50
@notapatch
Copy link
Contributor Author

did miss one tweak

I'll be honest Carlos I have "action callback" snow blindness and not a reliable witness. 😆

Tweak done!

Everything is green/passing and in a single commit!

@carlosantoniodasilva carlosantoniodasilva merged commit 1d13a7c into rails:main Apr 23, 2024
2 checks passed
@carlosantoniodasilva
Copy link
Member

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants