Sha256: a391fd41f1a7f49ece6c098747ae79b6d8e055318147542acf0eb68e9b1287ce

Contents?: true

Size: 531 Bytes

Versions: 4

Compression:

Stored size: 531 Bytes

Contents

class SofaGallery::Gallery < ActiveRecord::Base
  
  cms_is_categorized if defined?(ComfortableMexicanSofa)

  set_table_name :sofa_gallery_galleries
  
  # -- Relationships --------------------------------------------------------
  has_many :photos, :dependent => :destroy
  
  # -- Validations ----------------------------------------------------------
  validates :title,
    :presence => true
    
  validates :slug,
    :presence   => true,
    :uniqueness => true,
    :format     => { :with =>  /^\w[a-z0-9_-]*$/i }
    
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
sofa_gallery-0.0.6 app/models/sofa_gallery/gallery.rb
sofa_gallery-0.0.5 app/models/sofa_gallery/gallery.rb
sofa_gallery-0.0.4 app/models/sofa_gallery/gallery.rb
sofa_gallery-0.0.3 app/models/sofa_gallery/gallery.rb