For example, I want to update my_data with the session results:
my_data = []
url = "/some/endpoint/"
Session.ajax
url: url
type: 'get'
success: (data) ->
my_data = data
console.log JSON.stringify(my_data)
return my_data
my_data is still empty, so this is definitely not working. What is the correct way of doing this?