mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 07:10:12 +01:00
Fix a few user creation errors to be prettier
This commit is contained in:
parent
7b9a1e322f
commit
2bf2f9476a
2 changed files with 5 additions and 1 deletions
|
|
@ -81,13 +81,15 @@ class UsersController < ApplicationController
|
|||
end
|
||||
|
||||
unless params['approve_tos'] == 'on' || SITE_CONFIG['tos_link'].blank?
|
||||
render_failure "You have to accept the terms of service to sign up!"
|
||||
notify :error, t('users.tos_error')
|
||||
redirect_to signup_path
|
||||
return
|
||||
end
|
||||
|
||||
user = User.new(user_params)
|
||||
|
||||
unless user.valid?
|
||||
notify :error, t('users.create_error')
|
||||
redirect_to signup_path
|
||||
return
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue