From a7791635aa98f012d35f97c3c5288494bbb28e38 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Wed, 13 Mar 2024 18:03:43 +0100 Subject: Initial commit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miquel Sabaté Solà --- app/models/user.rb | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 app/models/user.rb (limited to 'app/models/user.rb') diff --git a/app/models/user.rb b/app/models/user.rb new file mode 100644 index 0000000..7eaba55 --- /dev/null +++ b/app/models/user.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +class User < ApplicationRecord + has_secure_password + + validates :username, presence: true, uniqueness: true + validates :password, presence: true, on: :create + validates :password_confirmation, presence: true, on: :create +end -- cgit v1.2.3