Sha256: 9ca9d453b17aa048871f56725012999fca31faebc4ac6ad5bd99ac697c375f65

Contents?: true

Size: 438 Bytes

Versions: 4

Compression:

Stored size: 438 Bytes

Contents

module C80AlbumGallery
  class Gallery < ActiveRecord::Base
    has_many :gphotos, :dependent => :destroy
    accepts_nested_attributes_for :gphotos,
                                  :reject_if => lambda { |attributes|
                                    !attributes.present?
                                  },
                                  :allow_destroy => true

    scope :def_order, -> {order(:created_at => :desc)}

  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
c80_album_gallery-0.1.0.4 app/models/c80_album_gallery/gallery.rb
c80_album_gallery-0.1.0.3 app/models/c80_album_gallery/gallery.rb
c80_album_gallery-0.1.0.2 app/models/c80_album_gallery/gallery.rb
c80_album_gallery-0.1.0.1 app/models/c80_album_gallery/gallery.rb