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