Sha256: f8ce65ce17ed13764bb74391e89a3f40dd22d74fadd2b97aceba4a175f6388a3

Contents?: true

Size: 587 Bytes

Versions: 49

Compression:

Stored size: 587 Bytes

Contents

# frozen_string_literal: true

module Hyrax
  module Actors
    class FileSetOrderedMembersActor < FileSetActor
      # Adds representative and thumbnail to work; sets file_set visibility
      # @param [ActiveFedora::Base] work the parent work
      # @param [Hash] file_set_params
      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
    end
  end
end

Version data entries

49 entries across 49 versions & 1 rubygems

Version Path
hyrax-5.1.0.pre.beta1 app/actors/hyrax/actors/file_set_ordered_members_actor.rb
hyrax-5.0.4 app/actors/hyrax/actors/file_set_ordered_members_actor.rb
hyrax-5.0.3 app/actors/hyrax/actors/file_set_ordered_members_actor.rb
hyrax-5.0.2 app/actors/hyrax/actors/file_set_ordered_members_actor.rb
hyrax-5.0.1 app/actors/hyrax/actors/file_set_ordered_members_actor.rb
hyrax-5.0.0 app/actors/hyrax/actors/file_set_ordered_members_actor.rb
hyrax-5.0.0.rc3 app/actors/hyrax/actors/file_set_ordered_members_actor.rb
hyrax-5.0.0.rc2 app/actors/hyrax/actors/file_set_ordered_members_actor.rb
hyrax-5.0.0.rc1 app/actors/hyrax/actors/file_set_ordered_members_actor.rb
hyrax-3.6.0 app/actors/hyrax/actors/file_set_ordered_members_actor.rb
hyrax-4.0.0 app/actors/hyrax/actors/file_set_ordered_members_actor.rb
hyrax-4.0.0.rc3 app/actors/hyrax/actors/file_set_ordered_members_actor.rb
hyrax-4.0.0.rc2 app/actors/hyrax/actors/file_set_ordered_members_actor.rb
hyrax-4.0.0.rc1 app/actors/hyrax/actors/file_set_ordered_members_actor.rb
hyrax-3.5.0 app/actors/hyrax/actors/file_set_ordered_members_actor.rb
hyrax-4.0.0.beta2 app/actors/hyrax/actors/file_set_ordered_members_actor.rb
hyrax-3.4.2 app/actors/hyrax/actors/file_set_ordered_members_actor.rb
hyrax-4.0.0.beta1 app/actors/hyrax/actors/file_set_ordered_members_actor.rb
hyrax-3.4.1 app/actors/hyrax/actors/file_set_ordered_members_actor.rb
hyrax-3.4.0 app/actors/hyrax/actors/file_set_ordered_members_actor.rb