Sha256: c274e76973d1b4637d082a115a46fe5a6050a692b88659e3757fbd4c6dd9fc38
Contents?: true
Size: 1.01 KB
Versions: 3
Compression:
Stored size: 1.01 KB
Contents
require 'polygallery/engine' require 'polygallery/paperclip_integration' # require 'polygallery/railtie' if defined? Rails module Polygallery DEFAULT_SETTINGS = { associations: { gallery: { class_name: '::Polygallery::Gallery', as: :galleryable, dependent: :destroy }, photos: { class_name: '::Polygallery::Photo', # before_add: :set_nest, dependent: :destroy, foreign_key: :gallery_id } }, association_names: { gallery: :gallery, photos: :photos }, nested_attributes: { gallery: { reject_if: :all_blank }, photos: { allow_destroy: true, reject_if: proc {|attributes| !attributes.key?('id') && attributes['photo'].nil? } } }, validates: {}, paperclip: { styles: {medium: '300x300#', thumb: '100x100#'}, default_url: 'polygallery/thumbnail-missing.jpg' }, paperclip_validations: { content_type: /\Aimage\/.*\Z/, presence: false } } end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
polygallery-0.4.8 | lib/polygallery.rb |
polygallery-0.4.7 | lib/polygallery.rb |
polygallery-0.4.6 | lib/polygallery.rb |