Rails3 ERB syntax requires a commented-out ERB block
Going from Rails 2.3.x to Rails 3.0.7 requires a change in ERB syntax that I just don't get.
I am getting a SyntaxError ( une开发者_运维技巧xpected kEND ) and I can make the error go away if I add the following commented-out line before the 'unexpected' kEND:
# %><%
This doesn't make sense to me and the fix is ugly. What am I doing wrong?
Here is the complete partial template code, and the error can be toggled by removing line # 19: http://pastie.org/1881607
UPDATE: I changed from ERB to HAML syntax to avoid this completely and have more readable code.
However, I believe the cause was ERB deprecation warnings in other template files included in application layout. Fixing the ERB deprecation warnings, I believe, would have fixed this problem.
[ a duplicate of my update to the actual question above ]
I believe the cause was ERB deprecation warnings in other template files included in application layout. Fixing the ERB deprecation warnings, I believe, would have fixed this problem.
精彩评论