Closed rept closed 6 years ago
I now have an element on my page like this:
= link_to raw('<i class="fa fa-caret-left"> </i>'), root_path(period: -1), :remote => true
This does a call that gets handled in the controller by format.js
In the dashboard.js.erb view I want to replace the gon values.
With the following hack this works:
<%= raw(include_gon.sub('<script>','').sub('//<![CDATA[','').sub('//]]>','').sub('</script>','')) %>
However, I think it could be useful to include a include_pure_js_gon that doesn't contain the Githubissues.
I now have an element on my page like this:
= link_to raw('<i class="fa fa-caret-left"> </i>'), root_path(period: -1), :remote => true
This does a call that gets handled in the controller by format.js
In the dashboard.js.erb view I want to replace the gon values.
With the following hack this works:
<%= raw(include_gon.sub('<script>','').sub('//<![CDATA[','').sub('//]]>','').sub('</script>','')) %>
However, I think it could be useful to include a include_pure_js_gon that doesn't contain the Githubissues.