mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-02-17 17:02:18 -05:00
20 lines
495 B
CoffeeScript
20 lines
495 B
CoffeeScript
|
RootView = require 'views/kinds/RootView'
|
||
|
template = require 'templates/kinds/user'
|
||
|
User = require 'models/User'
|
||
|
|
||
|
module.exports = class UserView extends RootView
|
||
|
template: template
|
||
|
className: 'user-view'
|
||
|
|
||
|
constructor: (options, nameOrID) ->
|
||
|
# TODO Ruben Assume ID for now
|
||
|
user = new User nameOrID
|
||
|
user.fetch
|
||
|
success: ->
|
||
|
console.log 'helabaaa'
|
||
|
error: (model, response, options) ->
|
||
|
console.log response
|
||
|
console.log options
|
||
|
|
||
|
super options
|