backbone-js-on-rails icon indicating copy to clipboard operation
backbone-js-on-rails copied to clipboard

Usage of as_json

Open coffeeaddict opened this issue 11 years ago • 0 comments

Hi,

For a project I am working on, I started using as_json (guided by the examples in your fine book).

Turns out, as_json is not such a good candidate when you use inclusion, etc.. When you (carefully) read rails/rails#567 and even more so the comments on rails/rails#2200 you will notice that using serializable_hash is most likely the better solution for real-world (and/or legacy) apps.

I would kindly request that you consider rewriting parts of the book to use serializable_hash or provide a hint to it's existance with possible pro's and con's.

coffeeaddict avatar Jul 17 '13 10:07 coffeeaddict