Is there any way to use the helper Rails method, and more specifically, the path helper method in the javascript asset file. This file is foo.js.coffee.erb
$('#bar').val("<%= create_post_path %>")
I would love it if I could get from erubis
$('#bar').val("path/to/create")
javascript ruby-on-rails ruby-on-rails-3 asset-pipeline erubis
axsuul Sep 17 2018-11-11T00: 00Z
source share