Given the following each block
<%@variables.each do | index, value |%>
<%= 'export ' + index.upcase %>=<%= value.upcase%>
<%= 'export ' + index.downcase %>=<%= value.downcase%>
<%end%>
I need it to render like this.
however it is rendering like this
what am i missing?
You need to use space trimming in your non-printing tags. Like this...
<%- @variables.each do | index, value | -%>
<%= 'export ' + index.upcase %>=<%= value.upcase %>
<%= 'export ' + index.downcase %>=<%= value.downcase %>
<%- end -%>
The <%-
and -%>
at the start and end of the first and last lines tells Ruby not to add a line break.