ruby-on-rails – 与%> 相比,Ruby on Rails中的 – %>是
发布时间:2020-12-17 04:29:41 所属栏目:百科 来源:网络整理
导读:参见英文答案 Difference between -% and % in rails 4个 What is the difference between %,%=,%# and -% in ERB in Rails?7个 我一直使用%= some_code%在使用Ruby on Rails时将Ruby插入HTML.我刚刚注意到其他项目有时使用%= some_code - %. 解决方法
参见英文答案 >
Difference between -%> and %> in rails 4个
> What is the difference between <%,<%=,<%# and -%> in ERB in Rails?7个 我一直使用<%= some_code%>在使用Ruby on Rails时将Ruby插入HTML.我刚刚注意到其他项目有时使用<%= some_code - %>. 解决方法
<%= some_code - %>最后的减号删除换行符.用于格式化生成的HTML,而<%= some_code%>才不是.
谢谢,Anubhaw (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |