Mega Code Archive

 
Categories / Ruby / Development
 

ERB template tags

Tag                Description <% ... %>          Ruby code; inline with output. <%= ... %>         Ruby expression; replace with result. <%# ... %>         Comment; ignored; useful in testing. %                  A line of Ruby code; treated as <% .. %>; set with trim_mode argument in ERB.new. %%                 Replace with % if it is the first thing on a line and % processing is used. <%% ... %%>        Replace with <% or %> , respectively.