spine/spine — pull request #473 by jackjennings (2013-06-18 15:42:22+00:00)
Title: expose ajax classes as globals for patching

Currently the Ajax module is pretty difficult to patch since most of the classes that it uses internally aren't exposed as global variables.

This patch does two things:
1) Exposes `Base`, `Singleton`, and `Collection` as globals under the Ajax namespace.
2) Creates a `stringify` method on the Ajax object that delegates to `JSON.stringify` to easily overwrite the logic buried in the `Singleton` ajax methods.

The later might not be necessary, as defining `toJSON` on a Spine model kind of does the same thing… however, this seems like a logical place to override if a global serializing behavior is desirable.