Sha256: 621863e5faf5866971d5dae51b8838cbd294b5724bb5c8430575210ac8f07286
Contents?: true
Size: 658 Bytes
Versions: 10
Compression:
Stored size: 658 Bytes
Contents
module Hyrax module Actors class AssignRepresentativeActor < AbstractActor def create(attributes) next_actor.create(attributes) && assign_representative end private def assign_representative unless curation_concern.representative_id # TODO: Possible optimization here. Does this cause a fetch of ordered_members if they're already loaded? representative = nil # curation_concern.ordered_members.association.reader.first.target curation_concern.representative = representative if representative end curation_concern.save end end end end
Version data entries
10 entries across 10 versions & 2 rubygems