meleyal / backbone-on-rails

A simple gem for using Backbone.js with Rails.
MIT License
808 stars 125 forks source link

Router not functioning #55

Closed mooru closed 11 years ago

mooru commented 11 years ago

I am trying to implement this gem but when i try to initialize a new instance of the Router Class in the js file. I get this error Uncaught TypeError: undefined is not a function. This is the js file

window.Library = Models: {} Collections: {} Views: {} Routers: {} initialize: -> @router = new Library.Routers.Books() Backbone.history.start()

$(document).ready -> Library.initialize()

meleyal commented 11 years ago

Can you also post your Router code?

mooru commented 11 years ago

I think it may have been solved. The error came from the js file after it had been parsed from coffeescript. I removed the js file and it worked and left the coffeescript file. I hope i don't see that error again.