release management

This commit is contained in:
2026-05-29 11:50:19 +02:00
parent 1fd7cffbb6
commit 43aca861a2
2 changed files with 24 additions and 12 deletions
+23 -12
View File
@@ -2,7 +2,7 @@ ActiveAdmin.register Software do
permit_params :name, :title, :author, :desc, :story,
:license, :platform, :status, :highlighted, :image_id,
external_links_attributes: [ :id, :label, :url, :_destroy ],
releases_attributes: [ :id, :_destroy ]
releases_attributes: [ :id, :version, :html_folder_path, :cartridge_path, :source_path, :docs_folder_path, :web_playable, :_destroy ]
menu priority: 2
@@ -58,18 +58,18 @@ ActiveAdmin.register Software do
end
end
f.actions
end
panel "Releases" do
table_for resource.releases.order(created_at: :desc) do
column :version
column :html_folder_path
column :cartridge_path
column :source_path
column :docs_folder_path
column :created_at
f.inputs "Releases" do
f.has_many :releases, allow_destroy: true, new_record: true do |r|
r.input :version
r.input :html_folder_path
r.input :cartridge_path
r.input :source_path
r.input :docs_folder_path
r.input :web_playable
end
end
f.actions
end
end
@@ -96,6 +96,17 @@ ActiveAdmin.register Software do
end
end
f.inputs "Releases" do
f.has_many :releases, allow_destroy: true, new_record: true do |r|
r.input :version
r.input :html_folder_path
r.input :cartridge_path
r.input :source_path
r.input :docs_folder_path
r.input :web_playable
end
end
f.actions
end
end
+1
View File
@@ -7,6 +7,7 @@ class Software < ApplicationRecord
has_many :external_links, foreign_key: :software_id
accepts_nested_attributes_for :external_links, allow_destroy: true
accepts_nested_attributes_for :releases, allow_destroy: true
default_scope { where(deleted_at: nil) }