names with multiple words doesn't seems to work #117

gouthamvel opened this Issue May 7, 2012 · 3 comments


None yet

4 participants


rails g backbone:scaffold StoreItems title:string content:string

index_view.js:27Uncaught TypeError: Cannot call method 'bind' of undefined

rylwin commented May 9, 2012

I had this exact same issue (just took me 30min to debug it, just getting around to playing w/ backbone!). It's due to an inconsistency of the name conversion (i.e., you sometimes see store_items and sometime storeItems in the js). This leads to an undefined error.

I also think I ran across a similar issue with namespaces (e.g, Namespace::ObjectName). I got inconsistent naming across the backbone classes generated by the scaffold, but I need to research this a bit more.

Is anyone currently working on these issues?

wuliwong commented Nov 4, 2012

I just encountered this same problem. I put it up on StackOverflow.

Essentially you just have to do a find and replace and change every 'storeItems' to 'store_items'. I would assume the find and replace the other direction would work as well, I just did it the way I mentioned. I'm not sure which choice would be better.

This issue should get labeled a bug, right?


@wuliwong cc/ @rylwin @gouthamvel

I think this would be an issue. I started a different repo ( that mimics this repo, but has updated Backbone and Underscore. I'd also like to have JS testing around jquery-rails and Backbone integration.

I'll confirm if the described issue exists in, and if issue is there there, fix it. :). Happy to work other PRs through the system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment