ministrycentered/batman-paginator — pull request #4 by Arjeno (2014-05-02 09:03:40+00:00)
Title: Use storage adapter

Sorry I couldn't get the tests working. Could you clarify your workflow on that? I am constantly getting errors:

```
Chrome 34.0.1847 (Mac OS X 10.9.2) ERROR
Uncaught SyntaxError: Unexpected token ILLEGAL
at /Users/arjenoosterkamp/Development/Batman/batman-paginator/spec/support/batman_request_mocks.coffee:2
Chrome 34.0.1847 (Mac OS X 10.9.2) ERROR
Uncaught SyntaxError: Unexpected token ILLEGAL
at /Users/arjenoosterkamp/Development/Batman/batman-paginator/spec/paginator_spec.coffee:2
Chrome 34.0.1847 (Mac OS X 10.9.2) ERROR
Uncaught SyntaxError: Unexpected string
at /Users/arjenoosterkamp/Development/Batman/batman-paginator/spec/paginator_view_spec.coffee:2
Chrome 34.0.1847 (Mac OS X 10.9.2) ERROR
Uncaught SyntaxError: Unexpected token >
at /Users/arjenoosterkamp/Development/Batman/batman-paginator/spec/subset_spec.coffee:1
Chrome 34.0.1847 (Mac OS X 10.9.2): Executed 0 of 0 ERROR (1.022 secs / 0 secs)
```

Is it not compiling Coffeescript?

Anyways, let me clarify this pull request. I am using custom prefixes in my models. Logically the paginator should derive the url from that. This can be overwritten by setting @url in the paginator;

```coffeescript
@set 'paginator', new Batman.Paginator
model: Order
url: '/some/other/url'
```

The second part of this pull request is deriving the proper namespace the results are returned in. In this case I think the paginator should also derive the namespace from the adapter. Again this can be overwritten by setting @namespace;

```coffeescript
@set 'paginator', new Batman.Paginator
model: Order
namespace: 'results' # instead of 'orders'
```

Let me know what you think.