mirror of
https://github.com/oonyeje/Pearlception_Website_RoR.git
synced 2025-12-25 03:37:40 +00:00
Fix missing password sign up bug
This commit is contained in:
parent
9e9c471b35
commit
19d19b5908
@ -10,9 +10,11 @@ class RegistrationsController < Devise::RegistrationsController
|
||||
def create
|
||||
user_params = sign_up_params
|
||||
@user = User.new(user_params)
|
||||
if user_params[:password] == nil || user_params[:password_confirmation] == nil
|
||||
if user_params[:password] == "" || user_params[:password_confirmation] == ""
|
||||
puts "NO PASSWORD ERROR"
|
||||
flash[:error] = "Need a password to sign up"
|
||||
redirect_to '/signin' and return
|
||||
redirect_to '/signin'
|
||||
return
|
||||
end
|
||||
if params[:company_serial]
|
||||
company = Company.find_by(company_token: params[:company_serial])
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user