Code cleanup.
This commit is contained in:
parent
b841834c3e
commit
9a551ea77c
1 changed files with 4 additions and 5 deletions
|
@ -1,5 +1,4 @@
|
||||||
$ = jQuery.sub()
|
$ = jQuery.sub()
|
||||||
User = App.User
|
|
||||||
|
|
||||||
class Index extends App.Controller
|
class Index extends App.Controller
|
||||||
className: 'container signup'
|
className: 'container signup'
|
||||||
|
@ -21,12 +20,12 @@ class Index extends App.Controller
|
||||||
render: ->
|
render: ->
|
||||||
|
|
||||||
# set password as required
|
# set password as required
|
||||||
for item in User.configure_attributes
|
for item in App.User.configure_attributes
|
||||||
if item.name is 'password'
|
if item.name is 'password'
|
||||||
item.null = false
|
item.null = false
|
||||||
|
|
||||||
@html App.view('signup')(
|
@html App.view('signup')(
|
||||||
form: @formGen( model: User, required: 'signup' ),
|
form: @formGen( model: App.User, required: 'signup' ),
|
||||||
)
|
)
|
||||||
|
|
||||||
cancel: ->
|
cancel: ->
|
||||||
|
@ -38,7 +37,7 @@ class Index extends App.Controller
|
||||||
@params = @formParam(e.target)
|
@params = @formParam(e.target)
|
||||||
###
|
###
|
||||||
for num in [1..199]
|
for num in [1..199]
|
||||||
user = new User
|
user = new App.User
|
||||||
params.login = 'login_c' + num
|
params.login = 'login_c' + num
|
||||||
user.updateAttributes(params)
|
user.updateAttributes(params)
|
||||||
return false
|
return false
|
||||||
|
@ -50,7 +49,7 @@ class Index extends App.Controller
|
||||||
|
|
||||||
@params.role_ids = [0]
|
@params.role_ids = [0]
|
||||||
@log 'updateAttributes', @params
|
@log 'updateAttributes', @params
|
||||||
user = new User
|
user = new App.User
|
||||||
user.load(@params)
|
user.load(@params)
|
||||||
|
|
||||||
errors = user.validate()
|
errors = user.validate()
|
||||||
|
|
Loading…
Reference in a new issue