Sha256: 3156b76467fb41a477a88f442721da2d7db8eb4f19c968794ab799e384ca5092
Contents?: true
Size: 466 Bytes
Versions: 5
Compression:
Stored size: 466 Bytes
Contents
# frozen_string_literal: true module Masks module Rails class Role < ApplicationRecord include Masks::Role self.table_name = "roles" belongs_to :actor, polymorphic: true, autosave: true belongs_to :record, polymorphic: true, autosave: true validates :type, presence: true, uniqueness: { scope: %i[actor_id actor_type record_id record_type] } end end end
Version data entries
5 entries across 5 versions & 1 rubygems