Class: Kiqr::OnboardingController
Instance Method Summary
collapse
#kiqr_flash_message, #kiqr_flash_message_now
#default_url_options
Instance Method Details
#show ⇒ Object
16
17
18
|
# File 'app/controllers/kiqr/onboarding_controller.rb', line 16
def show
@user.build_personal_account(personal: true)
end
|
#update ⇒ Object
20
21
22
23
24
25
26
27
28
29
30
|
# File 'app/controllers/kiqr/onboarding_controller.rb', line 20
def update
@user.assign_attributes(user_params)
@user.personal_account.personal = true
if @user.save
kiqr_flash_message(:notice, :onboarding_completed)
redirect_to after_onboarding_path(@user)
else
render :show, status: :unprocessable_entity
end
end
|