diff options
author | Akira Matsuda <ronnie@dio.jp> | 2011-11-09 14:34:10 +0900 |
---|---|---|
committer | Akira Matsuda <ronnie@dio.jp> | 2011-11-09 14:35:15 +0900 |
commit | ed2eac83125a2aa81cc83f946cc5ffff742f8ddb (patch) | |
tree | 6cc2063ef3b55626514743eda074094480f438e8 /activesupport | |
parent | 6e87281b5f9f6f7abf0ef93448c63396419f1920 (diff) | |
download | rails-ed2eac83125a2aa81cc83f946cc5ffff742f8ddb.tar.gz rails-ed2eac83125a2aa81cc83f946cc5ffff742f8ddb.tar.bz2 rails-ed2eac83125a2aa81cc83f946cc5ffff742f8ddb.zip |
Remove j alias for ERB::Util.json_escape
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/lib/active_support/core_ext/string/output_safety.rb | 7 |
1 files changed, 0 insertions, 7 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 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 |