Files
fizzy/app/controllers/first_runs_controller.rb
T
David Heinemeier Hansson a9c6f8bceb No reuse likely
2025-04-12 13:51:47 +02:00

20 lines
393 B
Ruby

class FirstRunsController < ApplicationController
allow_unauthenticated_access
before_action :prevent_repeats
def show
end
def create
user = FirstRun.create!(params.expect(user: [ :name, :email_address, :password ]))
start_new_session_for user
redirect_to root_path
end
private
def prevent_repeats
redirect_to root_path unless Account.none?
end
end