Squawks: multiple attachments, in-app photo viewer, downloads

Existing single attachments migrate to the new list. Photos open in a
full-screen viewer (swipe/arrow keys); every file has a download link.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rickyandClaude Opus 5.5 committed 2026-11-06 09:51:04 -05:00
1 parent 21ef577653
commit ef542ee2a5
12 files changed
+267 -13

No files matched your search

+2 -2
View File
@@ -7,11 +7,11 @@ class Squawk < ApplicationRecord
belongs_to :aircraft
belongs_to :component, optional: true
belongs_to :reported_by, class_name: "User", optional: true
has_one_attached :attachment
has_many_attached :attachments
validates :priority, inclusion: { in: PRIORITIES.keys }
validates :issue_reported, presence: true
validates_uploads :attachment
validates_uploads :attachments
scope :active, -> { where(resolved: false) }
scope :resolved, -> { where(resolved: true) }