mirror of
https://github.com/iritmaximus/brewery.git
synced 2026-10-12 19:13:49 +03:00
ratings are properly destroyed when user is deleted
This commit is contained in:
+1
-1
@@ -7,7 +7,7 @@ class User < ApplicationRecord
|
||||
validates :password, length: { minimum: 3 }
|
||||
validate :has_proper_characters_in_password
|
||||
|
||||
has_many :ratings
|
||||
has_many :ratings, dependent: :destroy
|
||||
has_many :beers, through: :ratings
|
||||
has_many :memberships, dependent: :destroy
|
||||
has_many :beer_clubs, through: :memberships
|
||||
|
||||
Reference in New Issue
Block a user