Sha256: c323d470756858b4e5670fc87b3798132198ef88203b92fe84b1167ff88be8d3
Contents?: true
Size: 619 Bytes
Versions: 18
Compression:
Stored size: 619 Bytes
Contents
module CurationConcerns 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
Version data entries
18 entries across 18 versions & 2 rubygems