Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Jan 28, 2013
  1. Akira Matsuda
Commits on Dec 3, 2012
  1. Jeremy Kemper

    Override <%== to always behave as literal text rather than toggling b…

    jeremy authored
    …ased on whether escaping is enabled. Fixes that existing plaintext email templates using <%== unexpectedly flipped to *escaping* HTML when #8235 was merged.
Commits on Nov 16, 2012
  1. Joost Baaij

    Introduce `ActionView::Template::Handlers::ERB.escape_whitelist`.

    tilsammans authored
    This is a list of mime types where template text is not html escaped
    by default. It prevents `Jack & Joe` from rendering as
    `Jack &amp; Joe` for the whitelisted mime types. The default whitelist
    contains text/plain.
    This follows a whitelist approach where plain text templates are
    not escaped, and all the others (json, xml) are. The mime type is
    assumed to be set by the abstract controller.
Commits on Aug 7, 2012
  1. David Heinemeier Hansson

    Revert "Merge pull request #7033 from kron4eg/master". Not a a fan at…

    dhh authored
    … all of what this makes ERB files look like.
    This reverts commit 46b8bce, reversing
    changes made to 2f58795.
  2. Artiom Di

    Restoring the '%' trim mode for ERb templates, allowing for a leading…

    kron4eg authored
    … percent sign on a line to indicate non-inserted Ruby code.
Commits on Aug 2, 2012
  1. Xavier Noria
Commits on Feb 22, 2012
  1. Santiago Pastorino

    format lookup for partials is derived from the format in which the te…

    spastorino authored
    …mplate is being rendered
    Closes #5025 part 2
Commits on Dec 24, 2011
  1. Sergey Nartimov
Commits on Nov 30, 2011
  1. José Valim
Commits on May 24, 2011
  1. Josh Kalderimis
  2. Josh Kalderimis
Commits on May 21, 2011
  1. Josh Kalderimis
Commits on Apr 16, 2011
  1. José Valim

    Yo dawg, I heard you like streaming. So I put a fiber, inside a block…

    josevalim authored
    …, inside a body, so you can stream.
  2. José Valim
Commits on Apr 3, 2011
  1. Akira Matsuda


    amatsuda authored
    The author of ERB sais, his eRuby implementation was originally named "ERb/ERbLight" and then renamed to "ERB" when started bundled as a Ruby standard lib.
Commits on Mar 5, 2011
  1. R.T. Lechow Xavier Noria

    Action Pack typos.

    rtlechow authored fxn committed
Commits on Nov 7, 2010
  1. Michael Koziarski

    Make safe_append= live on AV::OutputBuffer not AS::SafeBuffer

    NZKoz authored
  2. Jan M. Faber Michael Koziarski

    Added support for Erubis <%== tag

    Fjan authored NZKoz committed
    <%== x %> is syntactic sugar for <%= raw(x) %>
    Signed-off-by: Michael Koziarski <>
    [#5918 status:committed]
Commits on Oct 9, 2010
  1. José Valim
Commits on Aug 30, 2010
  1. José Valim
Commits on May 30, 2010
  1. Yehuda Katz
Commits on May 17, 2010
  1. Yehuda Katz
Commits on May 16, 2010
  1. Yehuda Katz

    Significantly improved internal encoding heuristics and support.

    wycats authored
    * Default Encoding.default_internal to UTF-8
    * Eliminated the use of file-wide magic comments to coerce code evaluated inside the file
    * Read templates as BINARY, use default_external or template-wide magic comments
      inside the Template to set the initial encoding
      * This means that template handlers in Ruby 1.9 will receive Strings encoded
        in default_internal (UTF-8 by default)
    * Create a better Exception for encoding issues, and use it when the template
      source has bytes that are not compatible with the specified encoding
    * Allow template handlers to opt-into handling BINARY. If they do so, they
      need to do some of their own manual encoding work
    * Added a "Configuration Gotchas" section to the intro Rails Guide instructing
      users to use UTF-8 for everything
    * Use config.encoding= in Ruby 1.8, and raise if a value that is an invalid
      $KCODE value is used
    * Fixed a few tests that were assert() rather than assert_equal() and
      were caught by Minitest requiring a String for the message
    * Fixed a test where an assert_select was misformed, also caught by
      Minitest being more restrictive
    * Fixed a test where a Rack response was returning a String rather
      than an Enumerable
  2. Yehuda Katz
  3. Simon Jefford José Valim

    Check blocks are not incorrectly detected when compiling erubis templ…

    simonjefford authored josevalim committed
    …ates [#4575 state:resolved]
    Signed-off-by: José Valim <>
Commits on Mar 15, 2010
  1. Add deprecation notices for <% %>.

    Carlhuda authored
      * The approach is to compile <% %> into a method call that checks whether
        the value returned from a block is a String. If it is, it concats to the buffer and
        prints a deprecation warning.
      * <%= %> uses exactly the same logic to compile the template, which first checks
        to see whether it's compiling a block.
      * This should have no impact on other uses of block in templates. For instance, in
        <% [1,2,3].each do |i| %><%= i %><% end %>, the call to each returns an Array,
        not a String, so the result is not concatenated
      * In two cases (#capture and #cache), a String can be returned that should *never*
        be concatenated. We have temporarily created a String subclass called NonConcattingString
        which behaves (and is serialized) identically to String, but is not concatenated
        by the code that handles deprecated <% %> block helpers. Once we remove support
        for <% %> block helpers, we can remove NonConcattingString.
Commits on Mar 12, 2010
  1. José Valim
  2. Jeremy Kemper
Commits on Mar 10, 2010
  1. Yehuda Katz
  2. Yehuda Katz

    Deprecate block_called_from_erb? pending a solution for getting it in…

    Carlhuda authored wycats committed
    …to apps
Commits on Feb 22, 2010
  1. José Valim
Commits on Feb 1, 2010
  1. Add support for compile-time <%= raw %>

    Yehuda Katz authored
  2. Santiago Pastorino

    Deleted all references to ActionView::SafeBuffer in favor of ActiveSu…

    spastorino authored Yehuda Katz committed
    Signed-off-by: Yehuda Katz <wycats@Yehuda-Katz.local>
Commits on Dec 25, 2009
  1. Instead of marking raw text in templates as safe, and then putting th…

    Yehuda Katz authored
    …em through String#<< which checks if the String is safe, use safe_concat, which uses the original (internal) String#<< and leaves the safe flag as is. Results in a significant performance improvement.
Commits on Dec 3, 2009
  1. Reorganize autoloads:

    Carlhuda authored
      * A new module (ActiveSupport::Autoload) is provide that extends
        autoloading with new behavior.
      * All autoloads in modules that have extended ActiveSupport::Autoload
        will be eagerly required in threadsafe environments
      * Autoloads can optionally leave off the path if the path is the same
        as full_constant_name.underscore
      * It is possible to specify that a group of autoloads live under an
        additional path. For instance, all of ActionDispatch's middlewares
        are ActionDispatch::MiddlewareName, but they live under 
      * It is possible to specify that a group of autoloads are all found
        at the same path. For instance, a number of exceptions might all
        be declared there.
      * One consequence of this is that testing-related constants are not
        autoloaded. To get the testing helpers for a given component,
        require "component_name/test_case". For instance, "action_controller/test_case".
      * test_help.rb, which is automatically required by a Rails application's
        test helper, requires the test_case.rb for all active components, so
        this change will not be disruptive in existing or new applications.
Something went wrong with that request. Please try again.