include csrf token with x-editable ajax
[arvados.git] / apps / workbench / app / models / user.rb
1 class User < ArvadosBase
2   def initialize(*args)
3     super(*args)
4     @attribute_sortkey['first_name'] = '050'
5     @attribute_sortkey['last_name'] = '051'
6   end
7
8   def self.current
9     res = $arvados_api_client.api self, '/current'
10     $arvados_api_client.unpack_api_response(res)
11   end
12
13   def full_name
14     (self.first_name || "") + " " + (self.last_name || "")
15   end
16 end