I use Rails and jquery and I need dynamic content with ajax.
But I do not know how to get the current user id
For example, URL: www.mywebsite.com/users/ 20
In my javascript file I need user id (20)
$.get("/users/<%= **20** %>.json", function(data)
{
}, "json");
Thanks in advance for your help.
Is there any other way to do this?
source
share