-
-
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
param as is not work #2237
Comments
This seems to work as expected, what output did you expect? |
@dblock params do
optional :page_size, as: :per_page, type: Integer
end
params #=> {per_page: 10}
declared(params) #=> {per_page: 10} |
@ly123525 it is recommended to use |
@dnesteryuk while your suggestion is good, the current behavior still looks like a bug because we have a clear description in README for how it should work.
And it'd worked it such way previously but not now. Looks like a breaking change. |
So did we introduce a regression, and in which version? Or should we change nothing and update documentation? @dnesteryuk does it change anything in your comment? |
ok, I figured it out when this behavior was changed, actually, it is described in the upgrading doc, so it isn't a bug, it is how Grape works after 1.6.0 and the motivation of the change makes sense. @dm1try probably, we need to update the doc 😉 |
@ly123525 or someone else here, care to update? thanks |
i upgrade from 1.31 to 1.6.0
@brynary @tmornini @ctennis @olleolleolle @bernd
How should I write? thanks
The text was updated successfully, but these errors were encountered: