Sha256: 894855358375e66149f492ce6279f5ac99010bab2ab7f472f192bb931a091ef8
Contents?: true
Size: 696 Bytes
Versions: 2
Compression:
Stored size: 696 Bytes
Contents
class Cms::Categorization < ActiveRecord::Base if ComfortableMexicanSofa.config.database_config && !Rails.env.test? establish_connection "#{ComfortableMexicanSofa.config.database_config}_#{Rails.env}" end 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
comfortable_mexican_sofa-1.4.7 | app/models/cms/categorization.rb |
comfortable_mexican_sofa-1.4.6 | app/models/cms/categorization.rb |