scinote-web/app/models/user_assignment.rb
artoscinote 3746332c30
Fixed cached user lists when changing assignments [SCI-6137] (#3597)
Fixed cache invalidation for assignables, current_user missing in cache keys [SCI-6137]
2021-10-19 16:00:52 +02:00

10 lines
305 B
Ruby

# frozen_string_literal: true
class UserAssignment < ApplicationRecord
belongs_to :assignable, polymorphic: true, touch: true
belongs_to :user_role
belongs_to :user
belongs_to :assigned_by, class_name: 'User', optional: true
enum assigned: { automatically: 0, manually: 1 }, _suffix: true
end