diff options
author | HombreLaser <sebastian-440@live.com> | 2023-03-22 18:01:14 -0600 |
---|---|---|
committer | HombreLaser <sebastian-440@live.com> | 2023-03-22 18:01:14 -0600 |
commit | a92be45296f8cc3210030602bd83a8d0229206cd (patch) | |
tree | a05581fb30ec20105a074af6e6a682823429e269 /app/models/user_account.rb | |
parent | bf58a3a1b148ed6b1ace157cfaafe34831706721 (diff) |
Añade modelo Address
Diffstat (limited to 'app/models/user_account.rb')
-rw-r--r-- | app/models/user_account.rb | 3 |
1 files changed, 3 insertions, 0 deletions
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? |