Sha256: 73efa6da67dc79bd3246d0c220eccad302829a0ca6024e2430bb82b5e84340e6

Contents?: true

Size: 933 Bytes

Versions: 8

Compression:

Stored size: 933 Bytes

Contents

class CustomGallery < Polygallery::Gallery
  # include Polygallery::CustomizedGallery

  has_polyphotos :associations => {
          :gallery => {
              :class_name => 'CustomGallery',
              :as => :galleryable,
              :dependent => :destroy
          },
          :photos => {
              :class_name => 'CustomPhoto',
              :before_add => :set_nest,
              :dependent => :destroy
          }
      },
      :association_names => {
          :gallery => :custom_gallery,
          :photos => :custom_photos
      },
      :nested_attributes => {
          :gallery => {:reject_if => :all_blank},
          :photos => {:reject_if => lambda{|attributes| attributes['photo'].nil? }, :allow_destroy => true}
      },
      :validates => {},
      :paperclip => {
        :styles => {:medium => '300x300#', :thumb => '100x100#'},
        :default_url => '/images/:style/missing.png'
      }


end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
polygallery-0.2.3 test/dummy/app/models/custom_gallery.rb
polygallery-0.2.1 test/dummy/app/models/custom_gallery.rb
polygallery-0.1.9 test/dummy/app/models/custom_gallery.rb
polygallery-0.1.8 test/dummy/app/models/custom_gallery.rb
polygallery-0.1.7 test/dummy/app/models/custom_gallery.rb
polygallery-0.1.6 test/dummy/app/models/custom_gallery.rb
polygallery-0.1.4 test/dummy/app/models/custom_gallery.rb
polygallery-0.1.2 test/dummy/app/models/custom_gallery.rb