I’m not sure this is the cause, but you can also try playing around with html_safe
method. ERB might be escaping your JSON because it thinks it’s not html safe. Try calling that method when using the string:
@object.to_json.html_safe
I’m not sure this is the cause, but you can also try playing around with html_safe
method. ERB might be escaping your JSON because it thinks it’s not html safe. Try calling that method when using the string:
@object.to_json.html_safe