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

rabl 0.11.6 causes custom root object label to say "string" #619

Open
aripollak opened this issue Feb 12, 2015 · 2 comments
Open

rabl 0.11.6 causes custom root object label to say "string" #619

aripollak opened this issue Feb 12, 2015 · 2 comments

Comments

@aripollak
Copy link

aripollak commented Feb 12, 2015

Under Rails 4.1.8, if I have a simple view defined like this:

object @foo => 'foo'
attributes :data, :id

and the controller sets @foo to be a FooPresenter, then upgrading from rabl 0.11.5 to 0.11.6 changes the rendered JSON output from this:
"foo" => {"data"=>"bar", "id"=>3250}
to this:
"string" => {"data"=>"bar", "id"=>3250}

I've tracked it down to this change. I'm not really sure what's going on there, but it looks like it's causing class name of the last part of the object hash to be stringified? Changing the 'foo' to :foo in the view does not exhibit the problem.

@nesquena
Copy link
Owner

@DouweM Could you take a look?

@johnnaegle
Copy link

Also seeing this

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

3 participants