-
Notifications
You must be signed in to change notification settings - Fork 21.9k
"Middleware#remove" is renamed "Middleware#delete!" #42867
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
Conversation
This commit intends to clarify the difference between `Middleware#delete` and `Middleware#delete!`. The former method silently fails when the target item is not found, while the latter raises an error. The functionality of `delete!` has been introduced in 688ed70 and given a name `remove`. This commit only renames it. Also, a brief description of `delete!` method is now provided for guides so that users can acknowledge the difference.
@@ -133,7 +133,7 @@ def delete(target) | |||
middlewares.reject! { |m| m.name == target.name } | |||
end | |||
|
|||
def remove(target) | |||
def delete!(target) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you also add some rdocs for delete!
and delete
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure I will! 😄
Co-authored-by: Marivaldo Cavalheiro <marivaldo@gmail.com>
@marivaldo @p8 |
Co-authored-by: Petrik de Heus <petrik@deheus.net>
Co-authored-by: Petrik de Heus <petrik@deheus.net>
@morgoth what do you think? |
@p8 I find it much more clear. 👍 |
@morgoth Great! 🎉 |
Summary
This commit intends to clarify the difference between
Middleware#delete
andMiddleware#delete!
.The former method silently fails when the target item is
not found, while the latter raises an error.
The functionality of
delete!
has been introduced in 688ed70and given a name
remove
. This commit only renames it.Also, a brief description of
delete!
method is nowprovided for guides so that users can acknowledge the difference.
Resolves #42862