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