Sha256: fe8c4cf1b7a2d291057fe9bc215a37bac656efc5c5e7c6bbc63bb6492bb74c89

Contents?: true

Size: 345 Bytes

Versions: 5

Compression:

Stored size: 345 Bytes

Contents

# frozen_string_literal: true

module Masks
  module Rails
    class Scope < ApplicationRecord
      self.table_name = "scopes"

      validates :name, presence: true, uniqueness: { scope: :actor_id }

      belongs_to :actor,
                 polymorphic: true,
                 class_name: Masks.configuration.models[:actor]
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
masks-0.4.0 app/models/masks/rails/scope.rb
masks-0.3.2 app/models/masks/rails/scope.rb
masks-0.3.1 app/models/masks/rails/scope.rb
masks-0.3.0 app/models/masks/rails/scope.rb
masks-0.2.0 app/models/masks/rails/scope.rb