diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-08-21 14:18:38 -0700 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-08-21 14:18:38 -0700 |
commit | d65a15dca6cd26ed1e40ec6313cf5ba740ba41e7 (patch) | |
tree | 7dc69264d37a99b59c5950f7ea4e909fd797b74b /activesupport | |
parent | 973b278598d0652c5563a164a268d384f4eac537 (diff) | |
parent | ed2eac83125a2aa81cc83f946cc5ffff742f8ddb (diff) | |
download | rails-d65a15dca6cd26ed1e40ec6313cf5ba740ba41e7.tar.gz rails-d65a15dca6cd26ed1e40ec6313cf5ba740ba41e7.tar.bz2 rails-d65a15dca6cd26ed1e40ec6313cf5ba740ba41e7.zip |
Merge pull request #3578 from amatsuda/remove_j_alias_for_json_escape
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 c17d695967..dad4b29d46 100644 --- a/activesupport/lib/active_support/core_ext/string/output_safety.rb +++ b/activesupport/lib/active_support/core_ext/string/output_safety.rb @@ -60,18 +60,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(JSON_ESCAPE_REGEXP) { |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 |