ERB: Embedding Ruby gotchas: <% 5.times do %> Blah!
<% end %> Bah Humbug! Produces: Blah!
Blah!
Blah!
Blah!
Blah!
Bah Humbug!
----------------------------------------------------------------------------- * The qualifier -%> removes the newlines from the block <% 5.times do -%> Blah!
<% end -%> Produces: Blah!
Blah!
Blah!
Blah!
Blah!
Bah Humbug! ----------------------------------------------------------------------------- * The second will produce nothing - html_escape Email: <%= h("Email address ") %> Email: <%= "Email address " %> ----------------------------------------------------------------------------- * link_to allows you link to actions: Say <%= link_to "Hello!", :action => "hello" %> ----------------------------------------------------------------------------- <%= debug(@variableName) %> and: <%= javascript_include_tag 'prototype' %> <% if ENV['RAILS_ENV'] == 'development' %>
Show Debug Info ➲
<% end %>