mirror of
https://github.com/rickbarrette/simple-aircraft-manager-rails.git
synced 2026-11-17 15:50:36 -05:00
- Besides the aircraft and engine/propeller models (and families), each in-use component is searched as maker + model designator and as component type + designator (e.g. "Champion 4301", "Magneto 4301"), so appliance ADs (magnetos, ELTs, radios, transponders) are found - A match records the component; tracking it makes the AD apply to that component instead of the airframe (ad_alerts.component_id) - Page hint, guide and README updated Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
8 lines
319 B
Ruby
8 lines
319 B
Ruby
class AddComponentToAdAlerts < ActiveRecord::Migration[8.1]
|
|
def change
|
|
# The installed component whose make/model matched, so tracking the AD
|
|
# makes it apply to that component (an appliance AD: magneto, ELT, radio…).
|
|
add_reference :ad_alerts, :component, foreign_key: { on_delete: :nullify }
|
|
end
|
|
end
|