maccman/spine-rails — Issue #12: Uncaught TypeError: Cannot read property 'prototype' of undefined
Author: dnagir
Created: 2011-10-23 07:32:43+00:00
State: open

When using scaffold generator: `rails g spine:scaffold User name email` and the opening the page the error is thrown.

```
Uncaught TypeError: Cannot read property 'prototype' of undefined
__extends users.js:6
(anonymous function) users.js:132
(anonymous function) users.js:150
(anonymous function) users.js:151
```

The line where it throws is:

```javascript
App.Users = (function() {
__extends(Users, Spine.Stack); // HERE!!!!!!!!!! It throws, trying to extend using CoffeeScript generated helper
function Users() {
Users.__super__.constructor.apply(this, arguments);
}
Users.prototype.controllers = {
index: Index,
edit: Edit,
show: Show,
"new": New
};
Users.prototype.routes = {
'/users/new': 'new',
'/users/:id/edit': 'edit',
'/users/:id': 'show',
'/users': 'index'
};
Users.prototype["default"] = 'index';
return Users;
})();
```