Sha256: b215c3bc0e886327019f6b5de930777c3702505ff25571f1a9d3561964b1459f

Contents?: true

Size: 496 Bytes

Versions: 15

Compression:

Stored size: 496 Bytes

Contents

module Gluttonberg
  class Gallery < ActiveRecord::Base
    self.table_name = "gb_galleries"
    include Content::SlugManagement
    include Content::Publishable

    attr_accessible :title, :slug, :description, :state, :published_at, :collection_imported
    has_many :gallery_images , :order => "position ASC"
    belongs_to :user

    def name
      title
    end

    def name=(new_name)
      title = new_name
    end

    def images
      gallery_images.map{|i| i.image }
    end

  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
gluttonberg-core-2.6.4 app/models/gluttonberg/gallery.rb
gluttonberg-core-2.6.3 app/models/gluttonberg/gallery.rb
gluttonberg-core-2.6.2 app/models/gluttonberg/gallery.rb
gluttonberg-core-2.6.1 app/models/gluttonberg/gallery.rb
gluttonberg-core-2.6.0 app/models/gluttonberg/gallery.rb
gluttonberg-core-2.5.9 app/models/gluttonberg/gallery.rb
gluttonberg-core-2.5.8 app/models/gluttonberg/gallery.rb
gluttonberg-core-2.5.7 app/models/gluttonberg/gallery.rb
gluttonberg-core-2.5.6 app/models/gluttonberg/gallery.rb
gluttonberg-core-2.5.5 app/models/gluttonberg/gallery.rb
gluttonberg-core-2.5.4 app/models/gluttonberg/gallery.rb
gluttonberg-core-2.5.3 app/models/gluttonberg/gallery.rb
gluttonberg-core-2.5.2 app/models/gluttonberg/gallery.rb
gluttonberg-core-2.5.1 app/models/gluttonberg/gallery.rb
gluttonberg-core-2.5 app/models/gluttonberg/gallery.rb