Use PictureUploader on Sponsor

This commit is contained in:
Henne Vogelsang 2016-04-27 15:55:39 +02:00
parent 0ad3ff01c3
commit f1f5fc1cd4
6 changed files with 12 additions and 25 deletions

View file

@ -11,8 +11,8 @@
= semantic_form_for(@sponsor, :url => (@sponsor.new_record? ? admin_conference_sponsors_path : admin_conference_sponsor_path(@conference.short_title, @sponsor))) do |f|
= f.input :name
= f.input :description
= image_tag f.object.logo(:thumb) if !f.object.logo.blank?
= f.input :logo
= image_tag f.object.picture.thumb.url if f.object.picture?
= f.input :picture
= f.input :website_url
= f.input :sponsorship_level, collection: @conference.sponsorship_levels
%p.text-right

View file

@ -19,7 +19,7 @@
- @conference.sponsors.each do |sponsor|
%tr
%td
= image_tag(sponsor.logo(:thumb), width: '20%')
= image_tag(sponsor.picture.thumb.url, width: '20%')
%td
= sponsor.name
%td