Sha256: 3d2d618412ba9fe80152371f212134a22c3d56f8feb26540cb404e22424ad9f6
Contents?: true
Size: 753 Bytes
Versions: 18
Compression:
Stored size: 753 Bytes
Contents
module CurationConcerns class ApplyOrderActor < AbstractActor def update(attributes) ordered_member_ids = attributes.delete(:ordered_member_ids) apply_order(ordered_member_ids) && next_actor.update(attributes) end private def apply_order(new_order) return true unless new_order curation_concern.ordered_member_proxies.each_with_index do |proxy, index| unless new_order[index] proxy.prev.next = curation_concern.ordered_member_proxies.last.next break end proxy.proxy_for = ActiveFedora::Base.id_to_uri(new_order[index]) proxy.target = nil end curation_concern.list_source.order_will_change! true end end end
Version data entries
18 entries across 18 versions & 2 rubygems