Add logo to conference page

This commit is contained in:
Matt Barringer 2013-01-17 15:56:56 +01:00
parent caa0dec6c4
commit 1d7670d74e
12 changed files with 61 additions and 18 deletions

View file

@ -1,7 +1,7 @@
class Conference < ActiveRecord::Base
attr_accessible :title, :short_title, :social_tag, :contact_email, :timezone, :html_export_path,
:start_date, :end_date, :rooms_attributes, :tracks_attributes,
:event_types_attributes, :registration_start_date, :registration_end_date
:event_types_attributes, :registration_start_date, :registration_end_date, :logo
has_paper_trail
@ -21,6 +21,13 @@ class Conference < ActiveRecord::Base
accepts_nested_attributes_for :event_types, :allow_destroy => true
accepts_nested_attributes_for :email_settings
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 }
validates_presence_of :title,
:short_title,
:social_tag