var characters = <%= @poop.to_json %>;
This is what safari console is showing:
Ahh, I up voted you all for the help. Thanks!
public is sent as-is.
One way to get
Alternatively, you could output
@poop in the HTML template in a
Ideally, we need more information to properly answer, but I'm going to guess some stuff to help you...
Assumption #1: You are using erb syntax (those "<%=" and "%>") in a .js file. These aren't parsed by Rails into anything meaningful.
var characters = "<%= @poop.to_json -%>";
©2020 All rights reserved.