diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/models/built_hearth_amenity.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/built_hearth_amenity.rb b/app/models/built_hearth_amenity.rb index c4d5a53..5ae8a42 100644 --- a/app/models/built_hearth_amenity.rb +++ b/app/models/built_hearth_amenity.rb @@ -1,4 +1,6 @@ class BuiltHearthAmenity < ApplicationRecord belongs_to :hearth belongs_to :hearth_amenity + + validates :hearth_id, uniqueness: { scope: :hearth_amenity_id } end |