ERB Trim Mode plugin

Plugin details

The plugin adds the ”%, <, >” to ERB trim_mode attribute.

Websitehttp://code.google.com/p/rails-erb-trim-mode/ Repositoryhttp://rails-erb-trim-mode.googlecode.com/svn/trunk/erb_trim_mode/ Author Vidul N. Petrov Tags erb LicenseMIT

Documentation

Install the plugin:
ruby script/plugin install http://rails-erb-trim-mode.googlecode.com/svn/trunk/erb_trim_mode/

ERB template system has the following possible values for its attribute 'trim_mode':

%  enables Ruby code processing for lines beginning with %
<> omit newline for lines starting with <% and ending in %>
>  omit newline for lines ending in %>The plugin adds the "%" capability. 


Once installed, the code in the ERB (rhtml) files can be written like this:

% array = (1..10).to_a
% array.each do |element|
    <%= element %>
% end

Further Documentation

There is currently no advanced documentation for this plugin.

New documentation

Edit plugin | (0 older versions) | Last edited by: hardway, 6 months ago