I'm not sure why you would want to use the controller name when DEFINING your function, but if you really do, then
ALTERNATIVELY,
You could predefine functions statically for each controller, e.g.:
function Users(param1, param3...){
....
}
function Friends(param1, param3...){
....
}
function Likes(param1, param3...){
....
}
function Posts(param1, param3...){
....
}
then add an additional JavaScript statement to launch the appropriate function depending on which controller is being called, e.g.:
<%= controller_name %>();