Sha256: 201d976c4b7cc458dd62f6a9dd11e226b50123f672d91a2d377d544f1769a9c5

Contents?: true

Size: 620 Bytes

Versions: 18

Compression:

Stored size: 620 Bytes

Contents

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

18 entries across 18 versions & 1 rubygems

Version Path
comfortable_mexican_sofa-1.6.31 app/models/cms/categorization.rb
comfortable_mexican_sofa-1.8.5 app/models/cms/categorization.rb
comfortable_mexican_sofa-1.8.4 app/models/cms/categorization.rb
comfortable_mexican_sofa-1.8.3 app/models/cms/categorization.rb
comfortable_mexican_sofa-1.8.2 app/models/cms/categorization.rb
comfortable_mexican_sofa-1.8.1 app/models/cms/categorization.rb
comfortable_mexican_sofa-1.8.0 app/models/cms/categorization.rb
comfortable_mexican_sofa-1.6.30 app/models/cms/categorization.rb
comfortable_mexican_sofa-1.7.3 app/models/cms/categorization.rb
comfortable_mexican_sofa-1.7.1 app/models/cms/categorization.rb
comfortable_mexican_sofa-1.7.0 app/models/cms/categorization.rb
comfortable_mexican_sofa-1.6.26 app/models/cms/categorization.rb
comfortable_mexican_sofa-1.6.25 app/models/cms/categorization.rb
comfortable_mexican_sofa-1.6.24 app/models/cms/categorization.rb
comfortable_mexican_sofa-1.6.23 app/models/cms/categorization.rb
comfortable_mexican_sofa-1.6.22 app/models/cms/categorization.rb
comfortable_mexican_sofa-1.6.21 app/models/cms/categorization.rb
comfortable_mexican_sofa-1.6.20 app/models/cms/categorization.rb