From ed2eac83125a2aa81cc83f946cc5ffff742f8ddb Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Wed, 9 Nov 2011 14:34:10 +0900 Subject: Remove j alias for ERB::Util.json_escape --- activesupport/lib/active_support/core_ext/string/output_safety.rb | 7 ------- 1 file changed, 7 deletions(-) (limited to 'activesupport/lib/active_support') 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 5d7f74bb65..c90f58dffa 100644 --- a/activesupport/lib/active_support/core_ext/string/output_safety.rb +++ b/activesupport/lib/active_support/core_ext/string/output_safety.rb @@ -45,18 +45,11 @@ class ERB # json_escape('{"name":"john","created_at":"2010-04-28T01:39:31Z","id":1}') # # => {name:john,created_at:2010-04-28T01:39:31Z,id:1} # - # This method is also aliased as +j+, and available as a helper - # in Rails templates: - # - # <%=j @person.to_json %> - # def json_escape(s) result = s.to_s.gsub(/[&"><]/) { |special| JSON_ESCAPE[special] } s.html_safe? ? result.html_safe : result end - alias j json_escape - module_function :j module_function :json_escape end end -- cgit v1.2.3