Sha256: 2bf582e3a6281b864e8244382482d0ffbec0313699ec7d4dfcaa522eeb19451b
Contents?: true
Size: 373 Bytes
Versions: 7
Compression:
Stored size: 373 Bytes
Contents
module Plutus module Tenancy extend ActiveSupport::Concern included do validates :name, presence: true, uniqueness: { scope: :tenant_id } if ActiveRecord::VERSION::MAJOR > 4 belongs_to :tenant, class_name: Plutus.tenant_class, optional: true else belongs_to :tenant, class_name: Plutus.tenant_class end end end end
Version data entries
7 entries across 7 versions & 3 rubygems