Sha256: 510a6ff964bcb456896e4de17d23ed1acbc7b6a4dfec46bee6f3c6cc6afa7f8b

Contents?: true

Size: 458 Bytes

Versions: 1

Compression:

Stored size: 458 Bytes

Contents

class Sofa::Gallery < ActiveRecord::Base
  
  set_table_name :sofa_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
sofa_gallery-0.0.0 app/models/sofa/gallery.rb