New-AD search covers every installed component

- 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>
This commit is contained in:
rickyandClaude Opus 5.5 committed 2026-11-09 21:05:07 -05:00
1 parent afaa1ca191
commit d2f5ce1e92
9 files changed
+91 -20

No files matched your search

+1 -1
View File
@@ -9,7 +9,7 @@ class AdAlertsController < ApplicationController
def check
found = AdWatch.new(@aircraft).check!
redirect_to aircraft_airworthiness_directives_path(@aircraft, anchor: "new-ads"),
notice: found.any? ? "Found #{helpers.pluralize(found.size, 'newly published AD')} to review." : "No new ADs found for #{AdWatch.new(@aircraft).terms.to_sentence}."
notice: found.any? ? "Found #{helpers.pluralize(found.size, 'newly published AD')} to review." : "No new ADs found for #{AdWatch.new(@aircraft).terms.map(&:label).uniq.to_sentence}."
rescue AdWatch::Error => e
redirect_to aircraft_airworthiness_directives_path(@aircraft), alert: "Couldn't check for new ADs: #{e.message}."
end