Module: CurationConcerns::CurationConcernController::ClassMethods

Defined in:
app/controllers/concerns/curation_concerns/curation_concern_controller.rb

Instance Method Summary collapse

Instance Method Details

#cancan_resource_classObject



37
38
39
# File 'app/controllers/concerns/curation_concerns/curation_concern_controller.rb', line 37

def cancan_resource_class
  CurationConcerns::ControllerResource
end

#curation_concern_typeObject



33
34
35
# File 'app/controllers/concerns/curation_concerns/curation_concern_controller.rb', line 33

def curation_concern_type
  _curation_concern_type
end

#curation_concern_type=(curation_concern_type) ⇒ Object



23
24
25
26
27
28
29
30
31
# File 'app/controllers/concerns/curation_concerns/curation_concern_controller.rb', line 23

def curation_concern_type=(curation_concern_type)
  load_and_authorize_resource class: curation_concern_type, instance_name: :curation_concern, except: [:show, :file_manager, :inspect_work]

  # Load the fedora resource to get the etag.
  # No need to authorize for the file manager, because it does authorization via the presenter.
  load_resource class: curation_concern_type, instance_name: :curation_concern, only: :file_manager

  self._curation_concern_type = curation_concern_type
end