This way changing it will be easier. Note we're moving the `legislation-draft-versions-form` class into the form component itself, which is wat we usually do in components.
18 lines
370 B
Ruby
18 lines
370 B
Ruby
class Admin::Legislation::DraftVersions::FormComponent < ApplicationComponent
|
|
include TranslatableFormHelper
|
|
include GlobalizeHelper
|
|
attr_reader :draft_version, :url
|
|
use_helpers :admin_submit_action
|
|
|
|
def initialize(draft_version, url:)
|
|
@draft_version = draft_version
|
|
@url = url
|
|
end
|
|
|
|
private
|
|
|
|
def process
|
|
draft_version.process
|
|
end
|
|
end
|