Add form to assign targets to a record

This commit is contained in:
Javi Martín
2020-11-25 12:02:03 +01:00
parent 11c3b3db13
commit f76279a4dd
10 changed files with 97 additions and 2 deletions

View File

@@ -0,0 +1,24 @@
class SDGManagement::Relations::EditComponent < ApplicationComponent
include Header
attr_reader :record
def initialize(record)
@record = record
end
private
def title
@record.title
end
def update_path
{
controller: "sdg_management/relations",
action: :update,
relatable_type: record.class.name.tableize,
id: record
}
end
end