This project is archived and is in readonly mode.

#4575 ✓resolved
Mike

Erubis template parsing error on invalid match for variable name containing "do"

Reported by Mike | May 11th, 2010 @ 01:23 PM | in 3.0.2

Re: Rails 3.0.0.beta3

See add_expr_literal method in Template::Handlers::Erubis. The expression BLOCK_EXPR falsely matches "do" during template compilation for a variable named "todo."

To reproduce, generate a scaffold for an entity named "Todo." The default output for the "Show" link is malformed and generates a syntax error ("unexpected tIVAR, expecting keyword_do or '{' or '('").

BLOCK_EXPR probably just needs word boundaries or whitespace around the "do."

If necessary, this mailing list thread has additional info:

http://groups.google.com/group/rubyonrails-talk/browse_thread/threa...

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Referenced by

Pages