When Backbone.js gets JSON from the server, it expects it to not have the
model-name wrapper that Rails/ActiveRecord applies via the to_json call. You
can disable this globally in Rails, but that would break legacy integration
points I have to support. Is there an elegant solution on either side?
When Backbone.js gets JSON from the server, it expects it to not have the
Share
Oh, much like my answer to your other question, in this case you can override parse() on your model. This is also generalizable in a model base class if you prefer.
Edited to add code.