Sha256: c9c20432492dfcec9d9af30e87b68a46b5f352b505d2a5615005437c27476fc0
Contents?: true
Size: 690 Bytes
Versions: 11
Compression:
Stored size: 690 Bytes
Contents
require "mongoid/publishable/queue" module Mongoid module Publishable module Queuing def self.included(base) base.class_eval do before_filter :deserialize_publishing_queue after_filter :serialize_publishing_queue attr_reader :publishing_queue end base.send(:include, InstanceMethods) end module InstanceMethods protected def deserialize_publishing_queue @publishing_queue = Queue.load(session[:publishing_queue]) end def serialize_publishing_queue session[:publishing_queue] = @publishing_queue.dump end end end end end
Version data entries
11 entries across 11 versions & 1 rubygems