class Alert < ApplicationRecord belongs_to :park, foreign_key: :park_code, primary_key: :code, inverse_of: :alerts end