Class: Kiqr::OnboardingController

Inherits:
KiqrController show all
Defined in:
app/controllers/kiqr/onboarding_controller.rb

Instance Method Summary collapse

Methods inherited from KiqrController

#kiqr_flash_message, #kiqr_flash_message_now

Methods inherited from ApplicationController

#default_url_options

Instance Method Details

#showObject



16
17
18
# File 'app/controllers/kiqr/onboarding_controller.rb', line 16

def show
  @user.(personal: true)
end

#updateObject



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 = true

  if @user.save
    kiqr_flash_message(:notice, :onboarding_completed)
    redirect_to after_onboarding_path(@user)
  else
    render :show, status: :unprocessable_entity
  end
end