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

Missing support for rendering hash in Panko::Response #32

Closed
LaithAzer opened this issue Oct 3, 2018 · 3 comments
Closed

Missing support for rendering hash in Panko::Response #32

LaithAzer opened this issue Oct 3, 2018 · 3 comments

Comments

@LaithAzer
Copy link

Hi,

Using Panko::Response.new, we are not able to render a hash in the response as we get an error thrown Can not push onto an Object without a key..

For example, doing it with normal render json works as follows:

my_hash = {
  foo: 'bar',
  bar: 'foo'
}

render json: { my_hash: my_hash }

This will give a response looking like: {"my_hash":{"foo":"bar","bar":"foo"}}.

However using Panko::Response, the error is thrown:

my_hash = {
  foo: 'bar',
  bar: 'foo'
}

render json: Panko::Response.new( my_hash: my_hash )

Will give error: Can not push onto an Object without a key..

Please let me know if any additional info is required.

Thanks for this awesome gem!
Laith

@yosiat
Copy link
Owner

yosiat commented Oct 5, 2018

Hi @LaithAzer ,

Thanks!

I will look into it today.

yosiat added a commit that referenced this issue Oct 19, 2018
@yosiat
Copy link
Owner

yosiat commented Oct 19, 2018

Hi @LaithAzer ,

Fixed the issue in the commit above, will release a version today/tomorrow.

Sorry for wait time

@yosiat yosiat closed this as completed Oct 19, 2018
@yosiat
Copy link
Owner

yosiat commented Oct 25, 2018

@LaithAzer version 0.5.6 is released to address this issue

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

No branches or pull requests

2 participants