update for "around_filter is deprecated and will be removed in Rails 5.1"
I got error like this.
DEPRECATION WARNING: around_filter is deprecated and will be removed in Rails 5.1. Use around_action instead.
So, I think around_action is better. If you have time, review please. 🍣
And happy new year!! ㊗️
Hmm.. I don't know why I got lint error in unchanged file, but can I fix lint error??
https://travis-ci.org/airbnb/hypernova/jobs/187915536
We support down to rails 3.0. Does around_action exist there? If not. We'd have to support both.
Okay, only version which >= 4.0.2 can use around_action. http://apidock.com/rails/v4.0.2/AbstractController/Callbacks/ClassMethods/around_action
I updated README.
Why is around_filter deprecated? How does it differ from around_action? There's no guarantee hypernova is compatible with the latter.
Why is around_filter deprecated?
Rename all action callbacks from *_filter to *_action to avoid the misconception that these callbacks are only suited for transforming or halting the response. With the new style, it's more inviting to use them as they were intended, like setting shared ivars for views.
Looks like its just change name...
But we cannot use around_filter with new versions. So I think we should change description about it.
If new people read readme, they would be confused by around_filter because it doesnt work.
FYR: https://github.com/rails/rails/blob/92703a9ea5d8b96f30e0b706b801c9185ef14f0e/guides/source/4_2_release_notes.md#notable-changes-1 https://github.com/rails/rails/commit/9d62e04838f01f5589fa50b0baa480d60c815e2c https://github.com/rails/rails/commit/6c5f43bab8206747a8591435b2aa0ff7051ad3de
@duoertai could you please create a new PR for this change, as the branch for the old PR could not pass CI builds.
Please do NOT create a new PR; this one should be repurposed.