From 9a551ea77c01ba7f54f7bc95b97922299e53260c Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Fri, 20 Apr 2012 18:12:37 +0200 Subject: [PATCH] Code cleanup. --- app/assets/javascripts/app/controllers/signup.js.coffee | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app/assets/javascripts/app/controllers/signup.js.coffee b/app/assets/javascripts/app/controllers/signup.js.coffee index f66b7d0dc..02b649f74 100644 --- a/app/assets/javascripts/app/controllers/signup.js.coffee +++ b/app/assets/javascripts/app/controllers/signup.js.coffee @@ -1,5 +1,4 @@ $ = jQuery.sub() -User = App.User class Index extends App.Controller className: 'container signup' @@ -21,12 +20,12 @@ class Index extends App.Controller render: -> # set password as required - for item in User.configure_attributes + for item in App.User.configure_attributes if item.name is 'password' item.null = false @html App.view('signup')( - form: @formGen( model: User, required: 'signup' ), + form: @formGen( model: App.User, required: 'signup' ), ) cancel: -> @@ -38,7 +37,7 @@ class Index extends App.Controller @params = @formParam(e.target) ### for num in [1..199] - user = new User + user = new App.User params.login = 'login_c' + num user.updateAttributes(params) return false @@ -50,7 +49,7 @@ class Index extends App.Controller @params.role_ids = [0] @log 'updateAttributes', @params - user = new User + user = new App.User user.load(@params) errors = user.validate()