Skip to content
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

Params 'as' option fails within 'given' block #1769

Closed
jereynolds opened this issue Jul 17, 2018 · 5 comments
Closed

Params 'as' option fails within 'given' block #1769

jereynolds opened this issue Jul 17, 2018 · 5 comments
Labels

Comments

@jereynolds
Copy link
Contributor

The parameter alias as option is ignored when a parameter is declared inside a given block

params do
  optional :label, as: :vertex_label, type: String
  given :label do
    optional :property, as: :vertex_property, type: String
  end
end

When a route with this params declaration is triggered, declared(params) evaluates to:
{ "vertex_label" => "MyLabel", "property" => "MyProperty" }

I expect the property parameter to be aliased to vertex_property in declared params, but this does not happen

@dblock
Copy link
Member

dblock commented Jul 18, 2018

Looks legit, try writing a spec for it?

@jereynolds
Copy link
Contributor Author

Added fix to the PR

@dblock
Copy link
Member

dblock commented Jul 23, 2018

Closing via #1771. Thanks @jereynolds!

@dblock dblock closed this as completed Jul 23, 2018
@jereynolds
Copy link
Contributor Author

Do you know what the expected time until the fix is released is?

@dblock
Copy link
Member

dblock commented Jul 24, 2018

Nope, but there're a bunch of changes so I'll do a release when I get to it or another maintainer beats me to it, #1773.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants