-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fix array indicies in error messages. #1463
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
@@ -3,6 +3,7 @@ | |||
|
|||
#### Features | |||
|
|||
* [#1463](https://github.com/ruby-grape/grape/pull/1463): Fix array indicies in error messages - [@ffloyd](https://github.com/ffloyd) |
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.
Missing period :)
Looks like specs are broken for some good reason(s). Check it out pls. |
72a11e9
to
6fa3a50
Compare
@dblock, i've fixed bug with coercion. Checkout last commit for details. |
Also, this PR may fix this issue: #1434 |
@@ -3,6 +3,7 @@ | |||
|
|||
#### Features | |||
|
|||
* [#1463](https://github.com/ruby-grape/grape/pull/1463): Fix array indicies in error messages. - [@ffloyd](https://github.com/ffloyd) |
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.
The period should be after your name here, look at the other lines :)
This looks good. I made a bunch of cosmetic comments, fix'em and I'll merge. Thanks. If you can squash commits that'd be cool too, otherwise I'll github squash them. |
@dblock done) |
Merged, thank you. |
@@ -3,6 +3,7 @@ | |||
|
|||
#### Features | |||
|
|||
* [#1463](https://github.com/ruby-grape/grape/pull/1463): Fix array indicies in error messages - [@ffloyd](https://github.com/ffloyd). |
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.
This should have probably been in Fixes, right? Just noticing this. PR something if it's true.
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.
Lol English is my third language too :)
I meant it's in the wrong section, there's features and fixes. This should be in fixes.
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.
Oh... I got it. I should create another PR or I can just commit here?
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.
Make a new PR, I already merged this one.
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.
@dblock I've noticed that you already fixed this. Thanks!
@ffloyd Thanks a lot for fixing this, I got it wrong and I didn't know how to fix it. |
Error messages for arrays was totally broken. It always returns index 0 and detect errors only for first entry in Array. You may cherry-pick to master first commit from this branch and run specs to see the problem.
Moreover, i have no idea how previous implementation of indicies may work correctly with current ParamsScope implementation (#1218).
Also i've found bug in coercion - look for TODO comment inside diff. Specs aren't green because of this bug.