Use PictureUploader on Conference

This commit is contained in:
Henne Vogelsang 2016-04-27 15:17:12 +02:00
parent cea9081347
commit 40023044af
8 changed files with 24 additions and 14 deletions

View file

@ -46,12 +46,7 @@ class Conference < ActiveRecord::Base
accepts_nested_attributes_for :targets, allow_destroy: true
accepts_nested_attributes_for :campaigns, allow_destroy: true
has_attached_file :logo,
styles: { thumb: '100x100>', large: '300x300>' }
validates_attachment_content_type :logo,
content_type: [/jpg/, /jpeg/, /png/, /gif/],
size: { in: 0..500.kilobytes }
mount_uploader :picture, PictureUploader, mount_on: :logo_file_name
validates_presence_of :title,
:short_title,