mirror of
https://github.com/oonyeje/Pearlception_Website_RoR.git
synced 2025-12-25 11:47:41 +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
|
def create
|
||||||
user_params = sign_up_params
|
user_params = sign_up_params
|
||||||
@user = User.new(user_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"
|
flash[:error] = "Need a password to sign up"
|
||||||
redirect_to '/signin' and return
|
redirect_to '/signin'
|
||||||
|
return
|
||||||
end
|
end
|
||||||
if params[:company_serial]
|
if params[:company_serial]
|
||||||
company = Company.find_by(company_token: params[:company_serial])
|
company = Company.find_by(company_token: params[:company_serial])
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user