Shopify/batman — Issue #334: Customizing storage adapters?
Author: iangreenleaf
Created: 2012-02-18 00:50:34+00:00
State: open

I'd like to write a CouchDB storage adapter. It's basically the `RestStorage` adapter, with some light customization (for ex. structuring incoming and outgoing JSON). The docs say

> Batman.RestStorage is a simple storage adapter which can be subclassed and extended to suit your needs.

...but I can't for the life of me figure out the preferred way to do this. So much of the logic is tied up in before/after callbacks, and I can't see a good way to override the small parts of logic I need to get at while leaving the rest of it alone.

Is there a master plan for how this class should be extended? I'll appreciate any guidance on this - despite reading a ton of the source, I still feel rather lost.