Sha256: af03f27d993c3ae7cd24a260d4754392ff6f52d0b0e7c2edd48e280237ea6754

Contents?: true

Size: 466 Bytes

Versions: 1

Compression:

Stored size: 466 Bytes

Contents

# frozen_string_literal: true

class Occams::Cms::Categorization < ActiveRecord::Base

  self.table_name = "occams_cms_categorizations"

  # -- Relationships -----------------------------------------------------------
  belongs_to :category
  belongs_to :categorized,
    polymorphic: true

  # -- Validations -------------------------------------------------------------
  validates :category_id,
    uniqueness: { scope: %i[categorized_type categorized_id] }

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
occams-1.0.0 app/models/occams/cms/categorization.rb