Class: OnboardingController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- OnboardingController
- Defined in:
- lib/generators/hello/install/templates/onboarding/onboarding_controller.rb
Instance Method Summary collapse
Instance Method Details
#continue ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/generators/hello/install/templates/onboarding/onboarding_controller.rb', line 7 def continue respond_to do |format| if update(params[:role]) format.html { redirect_to root_path, notice: 'Welcome!' } format.json { render json: { user: current_user.as_json_web_api }, status: :ok } else format.html { render action: 'index' } format.json { render json: { errors: 'invalid role supplied' }, status: :unprocessable_entity } end end end |
#index ⇒ Object
4 5 |
# File 'lib/generators/hello/install/templates/onboarding/onboarding_controller.rb', line 4 def index end |