eBooru/app/models/staff_audit_log.rb
Earlopain fc7d84affd
[RuboCop] Enable Style/FrozenStringLiteralComment
This reduces allocations on the posts page by about 5%, from basic testing
2024-02-25 18:15:55 +01:00

10 lines
229 B
Ruby

# frozen_string_literal: true
class StaffAuditLog < ApplicationRecord
belongs_to :user, class_name: "User"
def self.log(category, user, details = {})
create(user: user, action: category.to_s, values: details)
end
end