Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
和有什么区别:
<% @posts.each do |p| -%> <%= p.title %> <% end -%>
和
<% @posts.each do |p| %> <%= p.title %> <% end %>
有吗?
-%>表示不要在命令后插入 '\n' 和空格。
-%>
没有区别。
"-%>" 在 Rails 3 中完全没用。