Browse files

escape_all_output depends on ActiveSupport instead of Rails

  • Loading branch information...
databyte committed May 2, 2012
1 parent 2ead4f1 commit 656820183e62d72fbc6dc9fe970f6a0350fc5e6e
Showing with 2 additions and 2 deletions.
  1. +1 −1
  2. +1 −1 lib/rabl/helpers.rb
@@ -127,7 +127,7 @@ If `cache_all_output` is set to `true`, every template including each individual
Additionally, anything within child, glue and partial will also be cached separately.
To cache just a single template, see the section titled 'Caching' below.
-If `escape_all_output` is set to `true` and in Rails, attribute output will be escaped using [ERB::Util.html_escape](
+If `escape_all_output` is set to `true` and ActiveSupport is available, attribute output will be escaped using [ERB::Util.html_escape](
Custom nodes will not be escaped, use `ERB::Util.h(value)`.
Note that the `json_engine` option uses [multi_json]( engine
@@ -97,7 +97,7 @@ def template_cache_configured?
# escape output if configured
def escape_output(data)
- defined?(Rails) && Rabl.configuration.escape_all_output ? ERB::Util.h(data) : data
+ defined?(ActiveSupport) && Rabl.configuration.escape_all_output ? ERB::Util.h(data) : data

0 comments on commit 6568201

Please sign in to comment.