4e09352c09
We skip the QB code and we fill external account ids automatically on creation with a sequence See: https://github.com/basecamp/fizzy-saas/pull/7
25 lines
522 B
Ruby
25 lines
522 B
Ruby
class Signup::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
|
|
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
|