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
Issue with the latest upgrade 0.9.1 #746
Comments
|
I confirm this, happens after upgrading to 0.9.1 from 0.9.0. EDIT: After some debugging, this behavior was most likely introduced after the following change The change affects serializing behavior for Enumerables, though its effect on Hash might be undesirable. |
|
Hi, I am experiencing the same problem, render json: @this.returns_a_hash, root: false # hash {a: b}; output: [['a', 'b']]Is this intended new behavior? Is it fixed in master? Can we bump priority on this and release? Locking to Another question to consider is, if the |
|
No, this is a bug. |
|
Lemme see if I can fix :) |
|
I created a pull request within my fork, shwoodard#1, with a failing spec. I made it from my repo to my repo instead to rails-api/ams because it doesn't work. However, I time boxed this and the fix wasn't apparent. I'm happy to make another pull request against rails-api/ams with just the failing spec, if desired. |
|
@andrusha pointed this out in the discussion at the end of #665 but unfortunately it appears to have been included in the v0.9.1. It's not clear to me why @andreychernih wanted this change. If the desired payload is the kind of Enumerable that wants to be rendered as an array, then maybe the payload should just define |
|
+1 completely broke my app |
|
+1 |
1 similar comment
|
+1 |
|
+1 |
|
Just discovered this problem and it pretty much trashes any |
|
Yanking is always the wrong thing to do. I would like a fix, however. |
|
It is a bit drastic, but this is a pretty severe bug. I've found that several people I work with have encountered it independently and have had to roll back to 0.9.0. This is included as a dependency in popular gems like ember-rails so a lot of people are probably tripping over this without even realizing why. Republishing 0.9.0 as 0.9.2 would not be a bad idea until this can be properly resolved. |
I like this idea. I'll do this later today. :( |
|
I have re-released 0.9.0 as 0.9.2 until we can get a fix. |
|
Bummer about all this. Could you let us know what the release plan is? Does everyone need to resubmit their pull requests against v0.9.0 or should the owners of their respective features submit fixes for model-less json serialization bug and the namespace lookup bug? Thanks. |
|
Keep submitting to master. I just made https://github.com/rails-api/active_model_serializers/tree/0-9-2, which as you can see is just a version bump commit off of https://github.com/rails-api/active_model_serializers/releases/tag/v0.9.0 |
0.9.1 introduces unacceptable regressions in the 0.9.x series, and yanking isn't cool. So re-release 0.9.0 as 0.9.2, so that new users aren't messed up.
|
Thanks for fixing that. Helps keep things up to date. |
|
With render json: Member.allAnd I have a |
|
Figured out that it was because of how rails Since AMS |
|
@shwoodard I thought it was related, but it turned out not to be. It's not an issue for me anymore, you can just disregard it. |
|
0.9.2 is 0.9.0, so you'll get the same bugs you had in it. |
|
@steveklabnik The bug is only present in |
|
Exactly. |
|
We lost many, many good commits (almost 4 months) doing this. Could someone kindly pick the 0.9.1 tag, revert just that one commit and open a PR? I really can't do this because I don't use |
|
Wouldn't this be better than 0.9.2 even if there is a small regression or two? Seems to be working fine for me if this naive and completely unscientific data point helps any :) Ship It! :) |
|
Released https://rubygems.org/gems/active_model_serializers/versions/0.9.3. It's basically 0.9.1 (tons of bugfixes) minus the commit that caused tons of regressions. Please test and let us know how it goes |
After the upgrade
render json: { ok: true }is returning this{"sessions"=>[["ok", true]]}wheresessionsis the name of the controller. Its weird.adding a
to_jsonfixes itrender json: { ok: true }.to_json??The text was updated successfully, but these errors were encountered: