Open andrewhavens opened 11 years ago
Well I figured out the missing character. Apparently you need a colon after the arrow:
<% @collection.each (model)->: %>
Not sure why this is. It's not a CoffeeScript requirement. None of the code samples in the "blocks and capturing" section of the readme use a colon. Is this a bug, or an undocumented feature?
In case it matters, here are the eco-related version numbers in my Gemfile.lock file:
eco (1.0.0)
coffee-script
eco-source
execjs
eco-source (1.1.0.rc.1)
It's not a bug. Whenever you use an if or loop you need a colon at the end and an end keyword to end it. This is how Eco works.
I'm going to change the title of this issue. The issue is really that this isn't fully documented in the readme. I'll try to submit a pull request by the end of the day.
Just submitted pull request #64 to address this issue.
I am using Backbone and Eco templates in my Rails application. My template has the following code:
For some reason, the HTML is blank. The name and description are not displayed. However, the
console.log
method outputs the correct data. What am I doing wrong?