Sha256: 9a7656fe102427149eeccdfc9455e31e62a485314395197ba70fede454b81250
Contents?: true
Size: 1.05 KB
Versions: 5
Compression:
Stored size: 1.05 KB
Contents
require 'polygallery/engine' require 'polygallery/paperclip_integration' # <-- Try removing this monstrosity # 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
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
polygallery-0.4.5 | lib/polygallery.rb |
polygallery-0.4.4 | lib/polygallery.rb |
polygallery-0.4.2 | lib/polygallery.rb |
polygallery-0.4.1 | lib/polygallery.rb |
polygallery-0.4.0 | lib/polygallery.rb |