I am working on a jQuery chat room in ruby on rails and I am trying to include the current user’s name. However, whenever I write
var user=<%= current_user.name %>
the chat room stops working. What is wrong with the above statement? The current_user method returns the current user.
It should have been