Sha256: 9b5cd34f658e9d51173e24e28fee01342aa1b43abdac7fcaeb6c95beb5b47517

Contents?: true

Size: 586 Bytes

Versions: 20

Compression:

Stored size: 586 Bytes

Contents

class Cms::Categorization < ActiveRecord::Base
  
  ComfortableMexicanSofa.establish_connection(self)
  
  self.table_name = 'cms_categorizations'
  
  # -- 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

20 entries across 20 versions & 1 rubygems

Version Path
comfortable_mexican_sofa-1.9.2 app/models/cms/categorization.rb
comfortable_mexican_sofa-1.9.1 app/models/cms/categorization.rb
comfortable_mexican_sofa-1.9.0 app/models/cms/categorization.rb
comfortable_mexican_sofa-1.6.19 app/models/cms/categorization.rb
comfortable_mexican_sofa-1.6.18 app/models/cms/categorization.rb
comfortable_mexican_sofa-1.6.17 app/models/cms/categorization.rb
comfortable_mexican_sofa-1.6.16 app/models/cms/categorization.rb
comfortable_mexican_sofa-1.6.15 app/models/cms/categorization.rb
comfortable_mexican_sofa-1.6.14 app/models/cms/categorization.rb
comfortable_mexican_sofa-1.6.13 app/models/cms/categorization.rb
comfortable_mexican_sofa-1.6.12 app/models/cms/categorization.rb
comfortable_mexican_sofa-1.6.11 app/models/cms/categorization.rb
comfortable_mexican_sofa-1.6.10 app/models/cms/categorization.rb
comfortable_mexican_sofa-1.6.9 app/models/cms/categorization.rb
comfortable_mexican_sofa-1.6.8 app/models/cms/categorization.rb
comfortable_mexican_sofa-1.6.7 app/models/cms/categorization.rb
comfortable_mexican_sofa-1.6.6 app/models/cms/categorization.rb
comfortable_mexican_sofa-1.6.5 app/models/cms/categorization.rb
comfortable_mexican_sofa-1.6.4 app/models/cms/categorization.rb
comfortable_mexican_sofa-1.6.3 app/models/cms/categorization.rb