# frozen_string_literal: true class Account < ApplicationRecord serialize :password, CryptSerializer validates :username, presence: true validates :password, presence: true validates :home_folder, presence: true validates :contact_email, presence: true, email_format: true after_commit :update_vsftpd_files def update_vsftpd_files vsftp = FtpConfig.new vsftp.build_password_list Account.all vsftp.build_user_configs self end end