I am writing a js/coffee file that gets erb handling and I need to use
a url helper inside this file
url: ‘<%= url_for(:action => :index) %>’
I get an error:
NoMethodError Exception: undefined method `url_for’ for #<#<Class:
#Class:0xbdbb068 < Sprockets::Context
How do I make url_for accessible in Sprockets::Context?