cirandas.net

ref: master

plugins/community_track/lib/community_track_plugin/activation_job.rb


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
class CommunityTrackPlugin::ActivationJob < Struct.new(:step_id)

  def self.find(step_id)
    Delayed::Job.where(:handler => "--- !ruby/struct:CommunityTrackPlugin::ActivationJob\nstep_id: #{step_id}\n")
  end

  def perform
    step = CommunityTrackPlugin::Step.find(step_id)
    step.toggle_activation
  end

end