2👍
✅
Due to rendering, which uses to_s
under the hood which could cause some encoding issues while rendering from a string
type object. You should try using using html_safe
method on the object returned by @hr.to_json
like @hr.to_json.html_safe
Source:stackexchange.com