Class: Hyrax::WorkFormService

Inherits:
Object
  • Object
show all
Defined in:
app/services/hyrax/work_form_service.rb

Overview

A factory that builds work forms based on the ‘#model_name` of the work.

Class Method Summary collapse

Class Method Details

.build(curation_concern, current_ability, *extra) ⇒ Object



6
7
8
# File 'app/services/hyrax/work_form_service.rb', line 6

def self.build(curation_concern, current_ability, *extra)
  form_class(curation_concern).new(curation_concern, current_ability, *extra)
end

.form_class(curation_concern) ⇒ Object



10
11
12
# File 'app/services/hyrax/work_form_service.rb', line 10

def self.form_class(curation_concern)
  Hyrax.const_get("#{curation_concern.model_name.name}Form")
end