Files
fizzy/app/controllers/signups/completions_controller.rb
T
2025-12-19 15:36:52 -06:00

26 lines
559 B
Ruby

class Signups::CompletionsController < ApplicationController
layout "public"
disallow_account_scope
def new
@signup = Signup.new(identity: Current.identity)
end
def create
@signup = Signup.new(signup_params)
if @signup.complete
flash[:welcome_letter] = true
redirect_to landing_url(script_name: @signup.account.slug)
else
render :new, status: :unprocessable_entity
end
end
private
def signup_params
params.expect(signup: %i[ full_name ]).with_defaults(identity: Current.identity)
end
end