saucy/app/controllers/initial_setups_controller.rb

16 lines
329 B
Ruby
Raw Normal View History

class InitialSetupsController < ApplicationController
skip_before_action :initial_setup_redirect
before_action do
redirect_to("/") if !requires_initial_setup?
end
def show
end
def create
if User.count.zero?
@user = User.create!(email: params[:email], password: SecureRandom.hex(32))
end
end
end