osem-fcy/app/models/lodging.rb
Henne Vogelsang cb227a0afc Another round of splash design
* Add map to splash
* Reverse venue<->conference relation
* Split venue address into fields
* Don't go through venue for lodgings anymore
2014-11-20 15:39:26 +01:00

13 lines
467 B
Ruby

class Lodging < ActiveRecord::Base
attr_accessible :name, :description, :photo, :website_link, :conference_id
belongs_to :conference
validates :name, presence: true
has_attached_file :photo,
styles: { thumb: '100x100>', large: '300x300>' }
validates_attachment_content_type :photo,
content_type: [/jpg/, /jpeg/, /png/, /gif/],
size: { in: 0..500.kilobytes }
end