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

Fix wrong transformation of empty Array in declared params #1710

Conversation

pablonahuelgomez
Copy link
Contributor

@pablonahuelgomez pablonahuelgomez commented Nov 19, 2017

Updating PostBeforeFilter module to handle empty given arrays as expected:
returning an empty array instead of an empty hash.

Specs have been taken from #1678 and from this commit.

@pablonahuelgomez pablonahuelgomez force-pushed the make-declared-transform-to-what-is-expected branch 2 times, most recently from a916b06 to 594f570 Compare November 19, 2017 12:32
Copy link
Member

@dblock dblock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Specs make sense, but local state in the filter is probably bad.

lib/grape/dsl/inside_route.rb Outdated Show resolved Hide resolved
@pablonahuelgomez pablonahuelgomez force-pushed the make-declared-transform-to-what-is-expected branch from 594f570 to 1d5fec7 Compare November 21, 2017 20:04
@pablonahuelgomez
Copy link
Contributor Author

@dblock changes applied. Travis is red due to a worker issue:

oci runtime error: exec failed: container_linux.go:265: starting container process caused "could not create session key: disk quota exceeded"

CHANGELOG.md Outdated Show resolved Hide resolved
Updating PostBeforeFilter module to handle empty given arrays as expected:
returning an empty array instead of an empty hash.
@pablonahuelgomez pablonahuelgomez force-pushed the make-declared-transform-to-what-is-expected branch from 1d5fec7 to c2c89ce Compare November 22, 2017 01:21
@pablonahuelgomez pablonahuelgomez changed the title Make declared transform passed params to what is expected Fix wrong transformation of empty Array in declared params Nov 22, 2017
@dblock dblock merged commit b121d15 into ruby-grape:master Nov 22, 2017
@dblock
Copy link
Member

dblock commented Nov 22, 2017

Merged

@pablonahuelgomez pablonahuelgomez deleted the make-declared-transform-to-what-is-expected branch January 11, 2018 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants