Sha256: afd316e5ee2d3ff449234eaca49a4dd78830e412a9aa390d49ca6a327790990c

Contents?: true

Size: 294 Bytes

Versions: 12

Compression:

Stored size: 294 Bytes

Contents

class Gallery < ActiveRecord::Base
  attr_accessible :title
  belongs_to :index

  has_many :indices, :as => :owner, :dependent => :destroy

  accepts_nested_attributes_for :indices, :allow_destroy => true

  validates_presence_of :title

  def name
    title.downcase.gsub(" ", "_")
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
sbdevcore-0.2.15 app/models/gallery.rb
sbdevcore-0.2.14 app/models/gallery.rb
sbdevcore-0.2.13 app/models/gallery.rb
sbdevcore-0.2.12 app/models/gallery.rb
sbdevcore-0.2.11 app/models/gallery.rb
sbdevcore-0.2.10 app/models/gallery.rb
sbdevcore-0.2.9 app/models/gallery.rb
sbdevcore-0.2.8 app/models/gallery.rb
sbdevcore-0.2.7 app/models/gallery.rb
sbdevcore-0.2.6 app/models/gallery.rb
sbdevcore-0.2.5 app/models/gallery.rb
sbdevcore-0.2.4 app/models/gallery.rb