mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Add conference wide media, fix proposal#show view
This commit is contained in:
parent
4592802411
commit
633fff59d8
10 changed files with 82 additions and 54 deletions
|
|
@ -25,16 +25,11 @@ class Event < ActiveRecord::Base
|
|||
accepts_nested_attributes_for :people
|
||||
before_create :generate_guid
|
||||
|
||||
def self.media_types
|
||||
media_types = {:youtube => 'YouTube', :slideshare => 'SlideShare', :flickr => 'Flickr', :vimeo => 'Vimeo', :speakerdeck => 'Speakerdeck', :instagram => 'Instagram'}
|
||||
return media_types
|
||||
end
|
||||
|
||||
validate :abstract_limit
|
||||
validate :biography_exists
|
||||
validates :title, :presence => true
|
||||
validates :abstract, :presence => true
|
||||
validates :media_type, :allow_nil => true, inclusion: {in: self.media_types.values}
|
||||
validates :media_type, :allow_nil => true, inclusion: {in: Conference.media_types.values}
|
||||
|
||||
scope :confirmed, where(:state => "confirmed")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue