mirror of
https://github.com/rickbarrette/simple-aircraft-manager-rails.git
synced 2026-11-17 23:50:36 -05:00
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:
1 parent
21ef577653
commit
ef542ee2a5
12 files changed
+267
-13
No files matched your search
@@ -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) }
|
||||
|
||||
Reference in new issue
Block a user