Created
January 26, 2012 16:00
-
-
Save Dglgmut/1683480 to your computer and use it in GitHub Desktop.
Weird exception on Execjs with the 'for' operator, but everything works fine if I use another operator.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1>Listing Posts</h1> | |
<% for post in @posts: %> | |
<div class="item" data-id="<%= post.id %>"> | |
<a data-type="show"><%= post.title %></a> | |
<a data-type="edit">Edit</a> | |
<a data-type="destroy">Destroy</a> | |
</div> | |
<% end %> | |
<p><a data-type="new">New Post</a></p> | |
# Throws; | |
# Error: Parse error on line 2: Unexpected 'INDENT' | |
# (in C:/lab/jrails/blog/app/assets/javascripts/app/views/posts/index.jst.eco) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1>Listing Posts</h1> | |
<% if @posts.length: %> # << no exception | |
#everything works fine | |
<% end %> | |
<p><a data-type="new">New Post</a></p> | |
#everything works fine |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@bigfive no, I guess it was an issue with jruby at windows, because it worked fine at ubuntu