switch install state to db
This commit is contained in:
@@ -11,7 +11,7 @@ class SetupController < ApplicationController
|
||||
@user.invitation_accepted_at = Time.current
|
||||
|
||||
if @user.save
|
||||
create_installed_marker
|
||||
SetupState.mark_installed!
|
||||
session[:user_id] = @user.id
|
||||
redirect_to admin_root_path, notice: "Setup complete! Welcome to Sanasto Wiki."
|
||||
else
|
||||
@@ -28,15 +28,7 @@ class SetupController < ApplicationController
|
||||
end
|
||||
|
||||
def setup_completed?
|
||||
File.exist?(installed_marker_path)
|
||||
end
|
||||
|
||||
def installed_marker_path
|
||||
Rails.root.join(".installed")
|
||||
end
|
||||
|
||||
def create_installed_marker
|
||||
FileUtils.touch(installed_marker_path)
|
||||
SetupState.installed?
|
||||
end
|
||||
|
||||
def user_params
|
||||
|
||||
Reference in New Issue
Block a user