Sha256: 2b8c37266fd92f3afaa9be81767a6bb49267cf6fffbbb5fd6ff6b55ba40dade1

Contents?: true

Size: 506 Bytes

Versions: 8

Compression:

Stored size: 506 Bytes

Contents

class Cms::Categorization < ActiveRecord::Base
  include Cms::Base
  
  # -- Relationships --------------------------------------------------------
  belongs_to :category
  belongs_to :categorized,
    :polymorphic => true
    
  # -- Validations ----------------------------------------------------------
  validates :categorized_type, :categorized_id,
    :presence   => true
  validates :category_id,
    :presence   => true,
    :uniqueness => { :scope => [:categorized_type, :categorized_id] }
  
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
comfortable_mexican_sofa-1.11.2 app/models/cms/categorization.rb
comfortable_mexican_sofa-1.11.1 app/models/cms/categorization.rb
comfortable_mexican_sofa-1.11.0 app/models/cms/categorization.rb
comfortable_mexican_sofa-1.10.3 app/models/cms/categorization.rb
comfortable_mexican_sofa-1.10.2 app/models/cms/categorization.rb
comfortable_mexican_sofa-1.10.1 app/models/cms/categorization.rb
comfortable_mexican_sofa-1.10.0 app/models/cms/categorization.rb
comfortable_mexican_sofa-1.9.3 app/models/cms/categorization.rb