Implement state search with new model

This commit is contained in:
2025-10-08 08:22:04 -07:00
parent 7bf4073bd2
commit 55f712d043
4 changed files with 15 additions and 1 deletions

View File

@@ -1,4 +1,7 @@
class Park < ApplicationRecord
has_many :alerts, foreign_key: :park_code, primary_key: :code,
inverse_of: :park, dependent: :destroy
has_many :states, class_name: "ParksByState",
foreign_key: :park_code, primary_key: :code,
inverse_of: :parks, dependent: :destroy
end