class Weasel::EventsWorker

Public Instance Methods

perform(actor_class, actor_id, request_hash) click to toggle source
# File lib/weasel/workers/events_worker.rb, line 5
def perform(actor_class, actor_id, request_hash)
  return if actor_class.nil? || actor_id.nil? || request_hash.empty?

  Weasel::Event.create do |object|
    object.actor = actor_class.constantize.find(actor_id)
    object.action_data = request_hash
  end
end