-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Improve deprecation warning message #18923
Improve deprecation warning message #18923
Conversation
@@ -306,7 +306,8 @@ def kwarg_request?(*args) | |||
def non_kwarg_request_warning | |||
ActiveSupport::Deprecation.warn(<<-MSG.strip_heredoc) | |||
ActionDispatch::Integration::TestCase HTTP request methods will accept only | |||
keyword arguments in future Rails versions. | |||
the following keyword arguments in future Rails versions: | |||
#{REQUEST_KWARGS.join(', ')} |
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.
I was doing something like post '/documents', document: { title: "New things", content: "Doing them" }
and saw the deprecation message.
It wasn't immediately clear to me what the keyword arguments are.
Improve deprecation warning message
Thanks 💛 |
@kaspth You're welcome 😄 |
@@ -314,9 +315,7 @@ def non_kwarg_request_warning | |||
params: { id: 1 }, | |||
headers: { 'X-Extra-Header' => '123' }, | |||
env: { 'action_dispatch.custom' => 'custom' } |
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.
@tgxworld missed adding a trailing coma?
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.
good catch
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.
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.
👍
No description provided.