From deaf74104dfeecec4704a4af82837bbcb737c71d Mon Sep 17 00:00:00 2001 From: HombreLaser Date: Tue, 21 Feb 2023 19:06:59 -0600 Subject: AƱade modelo de usuario MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/application_record.rb | 1 + app/models/user_account.rb | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 app/models/user_account.rb (limited to 'app/models') diff --git a/app/models/application_record.rb b/app/models/application_record.rb index 08dc537..b616159 100644 --- a/app/models/application_record.rb +++ b/app/models/application_record.rb @@ -1,5 +1,6 @@ # frozen_string_literal: true +# ApplicationRecord base class. class ApplicationRecord < ActiveRecord::Base primary_abstract_class end diff --git a/app/models/user_account.rb b/app/models/user_account.rb new file mode 100644 index 0000000..b54c93d --- /dev/null +++ b/app/models/user_account.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +# UserAccount model +# email: string +# password_digest (secure password): string +# first_name: string +# last_name: string +# session_key: string +class UserAccount < ApplicationRecord + has_secure_password validations: false + + def full_name + "#{first_name} #{last_name}" + end +end -- cgit v1.2.3