-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
specs for declared(params) inside route_param bug. #1430
Conversation
@dblock @namusyaka please review this. |
Well these specs pass... weren't they supposed to fail? |
@dblock Hmm sorry I missed up. I wrote regression specs. I will rewrite them. |
@dblock I changed specs. not it failed and show problem correct. |
Hi guys. Any news about this issue? |
@dblock @namusyaka Please review my code. I find out where was a problem and fixed it. If everything ok can you please merge it, because I need this commit in my project. |
c8aa27e
to
2782d4c
Compare
Looks good to me. |
Looks good, needs a CHANGELOG entry please. |
f20a414
to
68b7c53
Compare
@dblock Done. |
@@ -11,6 +11,7 @@ | |||
|
|||
#### Fixes | |||
|
|||
* [#1430](https://github.com/ruby-grape/grape/pull/1430): Fix for declared(params) inside route_param. - [@Arkanain](https://github.com/Arkanain). |
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.
Sorry to be a pain. There shouldn't be a period after route_param
, also maybe quote the code as below?
5eca7d8
to
8e7de37
Compare
@dblock update. |
Excellent, merging. |
I check some specs on my project and I find out that this functionality work little bit wrong with declared when we have several route_param in one namespace.
For example we have:
declared(params)
should return us next hash{id: 1}
, but it return hash{id: 1, artist_id: nil}
.Also in first
route_param
in second endpoint(get :some_route
) when we calldeclared(params)
we have onlyfilter
params in returned hash{filter: 'some_filter'}
P.S.: I find out where we have problem! Problem is in options for route_param. where I use route_param :id without type: Integer everything is ok.