From a92be45296f8cc3210030602bd83a8d0229206cd Mon Sep 17 00:00:00 2001 From: HombreLaser Date: Wed, 22 Mar 2023 18:01:14 -0600 Subject: AƱade modelo Address MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/user_account.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'app/models/user_account.rb') diff --git a/app/models/user_account.rb b/app/models/user_account.rb index cd99441..0f94003 100644 --- a/app/models/user_account.rb +++ b/app/models/user_account.rb @@ -8,6 +8,9 @@ # session_key: string class UserAccount < ApplicationRecord has_secure_password validations: false + has_many :user_account_addresses + has_many :addresses, through: :user_account_addresses + validates :email, presence: true validates :email, uniqueness: true validates :password, presence: true, if: :no_password? -- cgit v1.2.3