class WebConsole::View

def render_inlined_string(template)

don't need to wrap the result yourself.
The inlined string is returned as an actual JavaScript string. You

Render inlined string to be used inside of JavaScript code.
def render_inlined_string(template)
  render(template: template, layout: "layouts/inlined_string")
end