Ruby On Rails
Ruby On Rails Blog by Shefalee Chaudhary
Friday, 7 October 2016
Difference between <%, <%=, <%# and -%> in ERB in Rails?
<%
%>
Executes the ruby code within the brackets.
<%=
%>
Prints something into erb file.
<%
-%>
Avoids line break after expression.
<%#
%>
Comments out code within brackets; not sent to client (as opposed to HTML comments).
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment