This commit is contained in:
2026-08-25 14:49:23 +02:00
parent c802605525
commit 552fdbe3a4
40 changed files with 207 additions and 182 deletions
+4
View File
@@ -96,6 +96,10 @@ ActiveAdmin.register WarpEngine::ApplicationToken, as: "Application Token" do
end
controller do
def scoped_collection
super.kept
end
def create
create! do |success, _failure|
success.html do
+1 -1
View File
@@ -100,7 +100,7 @@ ActiveAdmin.register WarpEngine::Download, as: "Download" do
controller do
def scoped_collection
super.includes(release: :software)
super.kept.includes(release: :software)
end
end
end
+6
View File
@@ -5,6 +5,12 @@ ActiveAdmin.register WarpEngine::ExternalLink, as: "External Link" do
belongs_to :software
controller do
def scoped_collection
super.kept
end
end
index do
selectable_column
id_column
+2 -2
View File
@@ -47,7 +47,7 @@ ActiveAdmin.register WarpEngine::Pipeline, as: "Pipeline" do
f.inputs do
f.input :platform, as: :select, collection: WarpEngine::PlatformLink::SUPPORTED_PLATFORMS
f.input :software_id, as: :select,
collection: WarpEngine::Software.order(:title).map { |s| [ s.title, s.id ] },
collection: WarpEngine::Software.kept.order(:title).map { |s| [ s.title, s.id ] },
include_blank: "- none -",
hint: "One pipeline per software. Picking one that another pipeline already " \
"has moves the link here — that pipeline is left without a software, " \
@@ -124,7 +124,7 @@ ActiveAdmin.register WarpEngine::Pipeline, as: "Pipeline" do
controller do
def scoped_collection
super.includes(:software)
super.kept.includes(:software)
end
end
end
+6
View File
@@ -14,6 +14,12 @@ ActiveAdmin.register WarpEngine::PlatformLink, as: "Platform Link" do
scope("Bevy") { |s| s.where(platform: "bevy") }
scope("Phaser") { |s| s.where(platform: "phaser") }
controller do
def scoped_collection
super.kept
end
end
index do
selectable_column
id_column
+6
View File
@@ -17,6 +17,12 @@ ActiveAdmin.register WarpEngine::Release, as: "Release" do
filter :version
controller do
def scoped_collection
super.kept
end
end
show do
attributes_table do
row :id
+1 -1
View File
@@ -150,7 +150,7 @@ ActiveAdmin.register WarpEngine::Software, as: "Software" do
controller do
def scoped_collection
super.includes({ releases: :release_assets }, software_images: :image)
super.kept.includes({ releases: :release_assets }, software_images: :image)
end
def find_resource