From 362b92dbebf1ccc529794890153f8c1bfc43637d Mon Sep 17 00:00:00 2001 From: David Gay Date: Sun, 11 Jul 2021 15:55:19 -0400 Subject: Give hearths a location --- app/models/hearth.rb | 1 + app/models/location.rb | 1 + 2 files changed, 2 insertions(+) (limited to 'app') diff --git a/app/models/hearth.rb b/app/models/hearth.rb index ee00c0c..cbd98dc 100644 --- a/app/models/hearth.rb +++ b/app/models/hearth.rb @@ -1,5 +1,6 @@ class Hearth < ApplicationRecord belongs_to :character + belongs_to :location has_many :built_hearth_amenities has_many :hearth_amenities, through: :built_hearth_amenities has_many :hearth_plantings diff --git a/app/models/location.rb b/app/models/location.rb index 7bd1386..e0aaf9b 100644 --- a/app/models/location.rb +++ b/app/models/location.rb @@ -3,6 +3,7 @@ class Location < ApplicationRecord has_many :activities has_many :characters + has_many :hearths has_many :monster_spawns validates :gid, :name, presence: true end -- cgit v1.2.3