My favorites | Sign in
Project Logo
                
Code license: MIT License
Labels: Ruby, Rails, plugin, ERB, templates, trim_mode
Blogs:
Feeds:
People details
Project owners:
  vidul.root

Rails ERB trim mode plugin

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 %><br/>
% end

Installation

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

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









Hosted by Google Code