Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

Andrew Valish's Profile

GitHub User: Valish


Comments by Andrew Valish


Turns out it was just an indent issue. Dope.


I can't quite wrap my head around this, but while following this tutorial line-by-line, my Backbone app refuses to render the view template. Please point me in the right direction, as this is my first experience with Backbone, and I've been circling around this problem for the past two days.

This is my /entries.js file:

class Raffler.Routers.Entries extends Backbone.Router
                '': 'index'
                'entries/:id': 'show'
        index: ->
                view = new Raffler.Views.EntriesIndex()
        show: (id) ->
                alert "entry #{id}"

If I were to replace $('#container').html(view.render().el) with $('#container').html('<h1>Raffler</h1>') , it would produce the desired outcome. I don't think the el attribute has a value.

My / file:

class Raffler.Views.EntriesIndex extends Backbone.View

  template: JST['entries/index']
        render: ->

Any help is appreciated!!