- Software, Release, ReleaseAsset, ExternalLink, PlatformLink, Image, SoftwareImage, Download now live in the engine under WarpEngine::, on top of WarpEngine::ApplicationRecord; table names unchanged (empty prefix) - each model runs an ActiveSupport load hook (:warp_engine_<model>) as a host extension point - WarpEngine::Image reads its upload path from WarpEngine.config - host references fully qualified (services, serializers, admin, specs); admin registrations renamed with as: so /admin URLs and route helpers are byte-identical; factories pinned to the namespaced classes - Member#image now class_name: "WarpEngine::Image" Verified: full suite green, /api/software and /api/builds byte-identical to the phase-0 baselines, admin routes unchanged. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
23 lines
538 B
Ruby
23 lines
538 B
Ruby
module WarpEngine
|
|
class ExternalLink < ApplicationRecord
|
|
self.table_name = "external_links"
|
|
|
|
belongs_to :software
|
|
|
|
validates :label, presence: true
|
|
validates :url, presence: true
|
|
|
|
default_scope { where(deleted_at: nil) }
|
|
|
|
def self.ransackable_attributes(auth_object = nil)
|
|
%w[created_at deleted_at id label software_id updated_at url]
|
|
end
|
|
|
|
def self.ransackable_associations(auth_object = nil)
|
|
%w[software]
|
|
end
|
|
|
|
ActiveSupport.run_load_hooks(:warp_engine_external_link, self)
|
|
end
|
|
end
|