codebrew / backbone-rails

Easily use backbone.js with rails 3.1
MIT License
1.62k stars 255 forks source link

@template() unexpectedly processes variables #98

Closed milushov closed 12 years ago

milushov commented 12 years ago

I don't understand what i doing wrong, it seems everything is working well, but for some reason the template gets [object HTMLDivElement] HELP! I already broke my brain! View and template

screenshot0 screenshot1

ryanfitz commented 12 years ago

looks like you are trying to code those templates as haml templates, but they are underscore jst templates.

To understand jst templates read over the underscore docs at http://underscorejs.org/#template

for example '= artist' should become <%= artist %>

milushov commented 12 years ago

No, if i write <%= artist %> i get: & lt;%= artist %& gt; And I use 'haml_coffee_assets' gem.

milushov commented 12 years ago

Hurray! I found it! Should to write = @artist lol