Shopify/batman — Issue #243: Uncaught ReferenceError: developer is not defined
Author: robotmay
Created: 2011-11-20 23:57:54+00:00
State: open

Might be something I've broken but I thought I'd chuck it up here for good measure. Seem to be getting the following error with some basic code using a model with some date fields:

```
Uncaught ReferenceError: developer is not defined batman.rails.js:21
Batman.mixin.railsDate.decode batman.rails.js:21
Batman.Model.Model.fromJSON batman.js:3448
__bind batman.js:15
Batman.SimpleHash.SimpleHash.forEach batman.js:1395
Batman.SimpleHash.SimpleHash.forEach batman.js:1398
Batman.Model.Model.fromJSON batman.js:3446
Batman.Association.hasMany.hasMany.encoder.decode batman.js:4055
Batman.Model.Model.fromJSON batman.js:3448
__bind batman.js:15
Batman.SimpleHash.SimpleHash.forEach batman.js:1395
Batman.SimpleHash.SimpleHash.forEach batman.js:1398
Batman.Model.Model.fromJSON batman.js:3446
Batman.RestStorage.RestStorage.optionsForRecord.url batman.js:4523
$passError batman.js:4277
Batman.StorageAdapter.StorageAdapter._filterData batman.js:4259
__bindbatman.js:15
Batman.StorageAdapter.StorageAdapter._filterData batman.js:4258
Batman.RestStorage.RestStorage.read.optionsForRecord.Batman.Request.$mixin.success batman.js:4623
__bind batman.js:15
Batman.Event.Event.fire batman.js:510
Batman.SimpleSet.SimpleSet.forEach batman.js:1640
Batman.SimpleHash.SimpleHash.forEach batman.js:1395
Batman.SimpleHash.SimpleHash.forEach batman.js:1398
Batman.SimpleSet.SimpleSet.forEach batman.js:1639
Batman.Event.Event.eachHandler batman.js:462
Batman.Event.Event.fire batman.js:509
Batman.EventEmitter.fire batman.js:567
Batman.Request.send.options.success batman.jquery.js:18
__bind batman.jquery.js:2
jQuery.Callbacks.fire jquery.js:1065
jQuery.Callbacks.self.fireWith jquery.js:1183
done jquery.js:7455
jQuery.ajaxTransport.send.callback jquery.js:8236
```

The apparently offending fields (error goes away if you remove this line):

```
@encode 'created_at', 'updated_at', 'published_at', Batman.Encoders.railsDate
```