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

Migrate before_filter to before_action #22

Open
bronzdoc opened this issue Mar 5, 2021 · 0 comments
Open

Migrate before_filter to before_action #22

bronzdoc opened this issue Mar 5, 2021 · 0 comments
Assignees

Comments

@bronzdoc
Copy link
Contributor

bronzdoc commented Mar 5, 2021

After Rails 5.1

All *_filter methods are now called *_action:
These methods were actually already deprecated in Rails 5.0, and Rails 5.1 removes support for *_filter usage, so you should be using *_action.

Before:

skip_before_filter :authenticate_user!
before_filter :authenticate_user!
after_filter :do_something

After:

skip_before_action :authenticate_user!
before_action :authenticate_user!
after_action :do_something
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants