다음 코드는 다음 첫<%=
는 <%
로 교체 할 경우, 다음 모든 작동하는 동안Ruby on Rails에서 <% = 또는 <%는 쇼인지 아닌지 만 중요하지만, 컴파일 오류가 발생하는 이유는 무엇입니까?
<div id="vote_form">
<%= form_remote_tag :url => story_votes_path(@story) do %>
<%= submit_tag 'shove it' %>
<% end %>
</div>
컴파일 오류를
을 제공합니다. 나는 그들이 단지 "쇼"또는 "보이지 않음"에 의해서만 다르다고 생각했지만 실제로 컴파일 에러를 일으킬 것인가?
오류 :
> SyntaxError in Stories#show
>
> Showing
> app/views/stories/show.html.erb where
> line #17 raised:
>
> compile error C:/Software
> Projects/ror/shov12/app/views/stories/show.html.erb:17:
> syntax error, unexpected ')' ...
> story_votes_path(@story) do).to_s);
> @output_buffer.concat ...
> ^C:/Software
> Projects/ror/shov12/app/views/stories/show.html.erb:23:
> syntax error, unexpected kENSURE,
> expecting ')' C:/Software
> Projects/ror/shov12/app/views/stories/show.html.erb:25:
> syntax error, unexpected kEND,
> expecting ')'