I would like to ask you - I have javascript code and I need into this part of code transmit variable with data from database. This variable is in controller. How can I do it?
I tried something like (in *.js):
$("#div").append('<%= escape_javascript(@test) %>hhhhhh');
or
$("#div").append('<%= @test %>hhhhhh');
But the codes above not works... Could you help me, please, how to do?
Thank you, Manny