From 6d09dd9778bbdf414739a47006647ce5ad1f3228 Mon Sep 17 00:00:00 2001 From: Zsolt Tasnadi Date: Mon, 27 Jul 2026 11:34:02 +0200 Subject: [PATCH] edit refact --- apps/api/app/admin/softwares.rb | 44 ++------------------------------- 1 file changed, 2 insertions(+), 42 deletions(-) diff --git a/apps/api/app/admin/softwares.rb b/apps/api/app/admin/softwares.rb index 918bc44..3021476 100644 --- a/apps/api/app/admin/softwares.rb +++ b/apps/api/app/admin/softwares.rb @@ -7,6 +7,8 @@ ActiveAdmin.register Software do menu priority: 2 + actions :all, except: [:edit] + index do selectable_column id_column @@ -94,46 +96,4 @@ ActiveAdmin.register Software do end end - form do |f| - f.inputs "Details" do - f.input :name - f.input :title - f.input :author - f.input :platform, as: :select, collection: %w[tic80 ebitengine love c64] - f.input :status, as: :select, collection: %w[development demo released archived] - f.input :highlighted - f.input :license - f.input :desc, as: :text, input_html: { rows: 4 } - f.input :story, as: :text, input_html: { rows: 8 } - end - - f.inputs "Images" do - f.has_many :software_images, allow_destroy: true, new_record: true do |si| - si.input :image_id, as: :select, label: "Image", - collection: Image.order(:original_filename).map { |img| [img.original_filename, img.id] } - si.input :is_default, as: :boolean - si.input :position, as: :number, input_html: { min: 0 } - end - end - - f.inputs "External Links" do - f.has_many :external_links, allow_destroy: true, new_record: true do |el| - el.input :label - el.input :url - 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