aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view
diff options
context:
space:
mode:
authorCiro Santilli <ciro.santilli@gmail.com>2014-09-03 16:08:22 +0200
committerCiro Santilli <ciro.santilli@gmail.com>2014-09-11 09:55:57 +0200
commit700ec897f97c60016ad748236bf3a49ef15a20de (patch)
tree4912382f7bd582dd45d511b4eecb7979323a18f2 /actionview/lib/action_view
parente2ce4c7aa3e15ffba9436bd8d179a28351d41e1f (diff)
downloadrails-700ec897f97c60016ad748236bf3a49ef15a20de.tar.gz
rails-700ec897f97c60016ad748236bf3a49ef15a20de.tar.bz2
rails-700ec897f97c60016ad748236bf3a49ef15a20de.zip
Explain ERB space removal. [ci skip]
Diffstat (limited to 'actionview/lib/action_view')
-rw-r--r--actionview/lib/action_view/base.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/actionview/lib/action_view/base.rb b/actionview/lib/action_view/base.rb
index d1bade0d3d..3071a13655 100644
--- a/actionview/lib/action_view/base.rb
+++ b/actionview/lib/action_view/base.rb
@@ -33,7 +33,9 @@ module ActionView #:nodoc:
#
# If you absolutely must write from within a function use +concat+.
#
- # <%- and -%> suppress leading and trailing whitespace, including the trailing newline, and can be used interchangeably with <% and %>.
+ # When on a line that only contains whitespaces except for the tag, <% %> suppress leading and trailing whitespace,
+ # including the trailing newline. <% %> and <%- -%> are the same.
+ # Note however that <%= %> and <%= -%> are different: only the latter removes trailing whitespaces.
#
# === Using sub templates
#