Sha256: 1fa2625cb63a81587ac5b6bef3dde2fcb95fb5f803374b28a46260c88b1a86c2

Contents?: true

Size: 582 Bytes

Versions: 30

Compression:

Stored size: 582 Bytes

Contents

class Cms::Categorization < ActiveRecord::Base
  
  ComfortableMexicanSofa.establish_connection(self)
  
  set_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

30 entries across 30 versions & 1 rubygems

Version Path
comfortable_mexican_sofa-1.6.2 app/models/cms/categorization.rb
comfortable_mexican_sofa-1.6.1 app/models/cms/categorization.rb
comfortable_mexican_sofa-1.6.0 app/models/cms/categorization.rb
comfortable_mexican_sofa-1.5.11 app/models/cms/categorization.rb
comfortable_mexican_sofa-1.5.10 app/models/cms/categorization.rb
comfortable_mexican_sofa-1.5.9 app/models/cms/categorization.rb
comfortable_mexican_sofa-1.5.8 app/models/cms/categorization.rb
comfortable_mexican_sofa-1.5.7 app/models/cms/categorization.rb
comfortable_mexican_sofa-1.5.6 app/models/cms/categorization.rb
comfortable_mexican_sofa-1.5.5 app/models/cms/categorization.rb
comfortable_mexican_sofa-1.5.4 app/models/cms/categorization.rb
comfortable_mexican_sofa-1.5.3 app/models/cms/categorization.rb
comfortable_mexican_sofa-1.5.2 app/models/cms/categorization.rb
comfortable_mexican_sofa-1.5.1 app/models/cms/categorization.rb
comfortable_mexican_sofa-1.5.0 app/models/cms/categorization.rb
comfortable_mexican_sofa-1.4.22 app/models/cms/categorization.rb
comfortable_mexican_sofa-1.4.21 app/models/cms/categorization.rb
comfortable_mexican_sofa-1.4.20 app/models/cms/categorization.rb
comfortable_mexican_sofa-1.4.19 app/models/cms/categorization.rb
comfortable_mexican_sofa-1.4.18 app/models/cms/categorization.rb