I have a Rails app that uses slim for templating. I'd like to have:
javascript:
window.ads.hasMap = ??? # value of show_map
like in .erb
window.ads.hasMap = <%=show_map %>;
How would I do this?
According to the docs, it looks like you want:
javascript:
window.ads.hasMap = #{show_map}
That is, wrap your ruby variable or method in #{...}
.