Sha256: 91632c0d7943e35d4ff6e303a22d2c4dfaafafaf91aa3b56b51e93f8c985e847
Contents?: true
Size: 669 Bytes
Versions: 37
Compression:
Stored size: 669 Bytes
Contents
module CurationConcerns 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
37 entries across 37 versions & 1 rubygems