Let's say I have 2 files, create.js.eex and post.html.eex , and I want to display the contents of the post.html.eex template inside the create.js.eex template. Something like that:
$("#something").append("<%= safe_to_string render "post.html", post: @post %>");
The above example does not work, because I need to avoid quotes and other things in the returned string, and I cannot find a way to do this
source share