textmate / ruby-on-rails-tmbundle

Ruby on Rails TextMate bundle [Learn it with PeepCode - http://peepcode.com/products/textmate-for-rails-2]
http://groups.google.com/group/rails-textmate
MIT License
15 stars 22 forks source link

ERB syntax error #12

Open jim-12gigs opened 10 years ago

jim-12gigs commented 10 years ago

This (valid) Rails helper shows a syntax error, but it shouldn't.

<%= form_for(:post) do |f| %> <% end %>

Removing the equal sign eliminates the syntax error, but also the generated code.

form

jim-12gigs commented 10 years ago

Playing around with it; apparently, this format is valid, as ERB is not trying to concat part of a do/end block. I still don't understand why the same ERB generates the correct code in Rails, but fails to parse it in TextMate.

<%= 
  form_for(:post) do |f|
    content_tag('input')
  end 
%>