Sha256: 47e190969807ee375b36a74b9cd99d84629a1f456c2b0399d8db7bad9be166f6

Contents?: true

Size: 525 Bytes

Versions: 1

Compression:

Stored size: 525 Bytes

Contents

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

  self.table_name = :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

1 entries across 1 versions & 1 rubygems

Version Path
comfy_gallery-0.1.0 app/models/gallery/gallery.rb