1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
require 'action_view/body_parts/future' module ActionView module BodyParts class Queued < Future def initialize(job, &block) super(&block) enqueue(job) end protected def enqueue(job) @receipt = submit(job) end def finish @parts << redeem(@receipt) end end end end