hummingbird-me/kitsu-server

View on GitHub
app/models/moderator_action_log.rb

Summary

Maintainability
A
0 mins
Test Coverage
B
80%
class ModeratorActionLog < ApplicationRecord
  belongs_to :user, required: true
  belongs_to :target, polymorphic: true, required: true

  def self.generate!(actor, verb, target)
    create!(user: actor, verb: verb, target: target)
  end
end