diff options
author | Pavel Pravosud <pavel@pravosud.com> | 2014-04-02 09:19:50 -0400 |
---|---|---|
committer | Pavel Pravosud <pavel@pravosud.com> | 2014-04-02 09:19:50 -0400 |
commit | 848289589edb74767cb97de9ed37a545a8d8b901 (patch) | |
tree | f5393a57418f671fb1b249e8cbbb273fdc8694e9 /activesupport | |
parent | 6df507e884baa8566b685bb1c555e42185570160 (diff) | |
download | rails-848289589edb74767cb97de9ed37a545a8d8b901.tar.gz rails-848289589edb74767cb97de9ed37a545a8d8b901.tar.bz2 rails-848289589edb74767cb97de9ed37a545a8d8b901.zip |
DRY AS::SafeBuffer a bit using existing helper
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/lib/active_support/core_ext/string/output_safety.rb | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/activesupport/lib/active_support/core_ext/string/output_safety.rb b/activesupport/lib/active_support/core_ext/string/output_safety.rb index db80cfa737..85cc75ff9a 100644 --- a/activesupport/lib/active_support/core_ext/string/output_safety.rb +++ b/activesupport/lib/active_support/core_ext/string/output_safety.rb @@ -171,11 +171,7 @@ module ActiveSupport #:nodoc: %w[concat prepend].each do |method_name| define_method method_name do |value| - if !html_safe? || value.html_safe? - super(value) - else - super(ERB::Util.h(value)) - end + super(html_escape_interpolated_argument(value)) end end alias << concat |