Class: Hyrax::Actors::FileSetOrderedMembersActor
- Inherits:
-
FileSetActor
- Object
- FileSetActor
- Hyrax::Actors::FileSetOrderedMembersActor
- Defined in:
- app/actors/hyrax/actors/file_set_ordered_members_actor.rb
Instance Attribute Summary
Attributes inherited from FileSetActor
Instance Method Summary collapse
-
#attach_to_work(work, file_set_params = {}) ⇒ Object
Adds representative and thumbnail to work; sets file_set visibility.
Methods inherited from FileSetActor
#create_content, #create_metadata, #destroy, #initialize, #revert_content, #update_content, #update_metadata
Methods included from Lockable
#acquire_lock_for, #lock_manager
Constructor Details
This class inherits a constructor from Hyrax::Actors::FileSetActor
Instance Method Details
#attach_to_work(work, file_set_params = {}) ⇒ Object
Adds representative and thumbnail to work; sets file_set visibility
9 10 11 12 13 |
# File 'app/actors/hyrax/actors/file_set_ordered_members_actor.rb', line 9 def attach_to_work(work, file_set_params = {}) file_set.visibility = work.visibility unless assign_visibility?(file_set_params) work.representative = file_set if work.representative_id.blank? work.thumbnail = file_set if work.thumbnail_id.blank? end |