figured it out. it was problems with indentation, which meant that the code which was supposed to be in init() was actually outside the method, and was being called before the router was loaded. small gotcha for someone not used for coffeescript.
but i can't initialize the router. i get an error telling me that "Bb.Routers.Entries is not a contructor". (my app is called Bb instead of Raffler.) i suspect this is related to load order, but get find a way to fix it.
file bb.js.coffee:
window.Bb =
Models: {}
Collections: {}
Views: {}
Routers: {}
init: ->
new Bb.Routers.Entries() <--- this is the offending line
Backbone.history.start()
$(document).ready ->
Bb.init()
figured it out. it was problems with indentation, which meant that the code which was supposed to be in init() was actually outside the method, and was being called before the router was loaded. small gotcha for someone not used for coffeescript.
nice tutorial!
but i can't initialize the router. i get an error telling me that "Bb.Routers.Entries is not a contructor". (my app is called Bb instead of Raffler.) i suspect this is related to load order, but get find a way to fix it.
file bb.js.coffee:
file entries_router.js.cofee:
file application.js:
gem versions:
backbone-on-rails (0.9.1.0)
rails (3.2.1)
coffee-rails (3.2.2)