diff options
author | Andrew Vit <andrew@avit.ca> | 2018-08-09 02:26:46 -0700 |
---|---|---|
committer | Andrew Vit <andrew@avit.ca> | 2018-09-21 12:30:40 -0700 |
commit | dd0cfb03b233e23b13e087f1cd39169b1ff6d936 (patch) | |
tree | 32754939d03b01d8cb33c6110bef31465f3f3301 /activerecord/test/cases/comment_test.rb | |
parent | 0193b89be6827fb6aa20f83af164901dc3e31590 (diff) | |
download | rails-dd0cfb03b233e23b13e087f1cd39169b1ff6d936.tar.gz rails-dd0cfb03b233e23b13e087f1cd39169b1ff6d936.tar.bz2 rails-dd0cfb03b233e23b13e087f1cd39169b1ff6d936.zip |
Let escape_javascript handle conversion to string
This brings `escape_javascript` in line with the behavior of `json_escape` and
allows other value types to be output without needing explicit casting in the
view template.
Example:
<%= javascript_tag do %>
var locale = '<%== j I18n.locale %>'; // locale is a symbol
<% end %>
Diffstat (limited to 'activerecord/test/cases/comment_test.rb')
0 files changed, 0 insertions, 0 deletions