mirror of https://github.com/docusealco/docuseal
				
				
				
			
			You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							24 lines
						
					
					
						
							497 B
						
					
					
				
			
		
		
	
	
							24 lines
						
					
					
						
							497 B
						
					
					
				# frozen_string_literal: true
 | 
						|
 | 
						|
class RegistrationsController < Devise::RegistrationsController
 | 
						|
  private
 | 
						|
 | 
						|
  def build_resource(_hash = {})
 | 
						|
    account = Account.new(account_params)
 | 
						|
 | 
						|
    self.resource = account.users.new(user_params)
 | 
						|
  end
 | 
						|
 | 
						|
  def user_params
 | 
						|
    return {} if params[:user].blank?
 | 
						|
 | 
						|
    params.require(:user).permit(:first_name, :last_name, :email, :password)
 | 
						|
  end
 | 
						|
 | 
						|
  def account_params
 | 
						|
    return {} if params[:account].blank?
 | 
						|
 | 
						|
    params.require(:account).permit(:name)
 | 
						|
  end
 | 
						|
end
 |