I am attempting to migrate a simple rails 4 app from server-side .erb (or .haml) to a single-page-app using backbone.js. Since I am new to this, I followed a Railcast tutorial, #323. The tutorial was done using Rails 3.2, but I used my current Rails 4 gemset. All went well until I attempted to use an .eco template to construct a view, as follows:
class Raffler.Views.EntriesIndex extends Backbone.View
template: JST['entries/index']
render: ->
$(@el).html(@template())
this
When I inspect this with the js console (google chrome), I find that 'JST' is undefined. Is there something I need to include to make this work?
for me
in gemfile solved the problem of JST not being defined.