rails/rails — pull request #5915 by JEG2 (2012-04-21 01:35:26+00:00)
Title: Restore "%" ERb/Erubis Trim Mode

Restored support for the "%" ERb/Erubis _trim mode_. This can be activated with:

config.action_view.erb_trim_mode = "%" # or "%-" whitespace trim

With that mode active, you can use a single percent sign at the beginning of a line to engage Ruby mode (without inserting results). It allows for template code like this:

% if current_user.try(:admin?)
<%= render "edit_links" %>
% end