Module: Shrine::Plugins::KithePromotionHooks::AttacherClassMethods

Defined in:
lib/shrine/plugins/kithe_promotion_hooks.rb

Instance Method Summary collapse

Instance Method Details

#load(data) ⇒ Object

Overridden to restore any serialized promotion_directives to context, in backgrounding promotion.



61
62
63
64
65
66
67
# File 'lib/shrine/plugins/kithe_promotion_hooks.rb', line 61

def load(data)
  super.tap do |attacher|
    if data["promotion_directives"]
      attacher.context[:promotion_directives] = data["promotion_directives"]
    end
  end
end