showing results for - "rails to json"
Alayna
04 Jun 2017
1// Used in Rails 6
2// Inside your template you can have a Model converted in Json (Javascript) 
3// adding:
4
5const JavascriptVariable = <%=raw @model.to_json() %>;
6