I have the following variable in my controller
class MyController < ApplicationController
def my_method
@status = "status"
end
end
in my view haml, I tried following, but it does not work (since it uses the default .erb syntax)
:javascript
alert(<%=raw @status %>)
How can I use a variable @statusinside my built-in java script, thanks in advance
source
share