2018-05-07 16:47:29 -07:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
2021-02-20 09:57:27 -08:00
|
|
|
# == Schema Information
|
|
|
|
|
#
|
|
|
|
|
# Table name: lodgings
|
|
|
|
|
#
|
|
|
|
|
# id :bigint not null, primary key
|
|
|
|
|
# description :text
|
|
|
|
|
# name :string
|
|
|
|
|
# photo_content_type :string
|
|
|
|
|
# photo_file_name :string
|
|
|
|
|
# photo_file_size :integer
|
|
|
|
|
# photo_updated_at :datetime
|
|
|
|
|
# picture :string
|
|
|
|
|
# website_link :string
|
|
|
|
|
# created_at :datetime
|
|
|
|
|
# updated_at :datetime
|
|
|
|
|
# conference_id :integer
|
|
|
|
|
#
|
2017-09-05 22:23:34 +03:00
|
|
|
class Lodging < ApplicationRecord
|
2014-11-20 14:57:03 +01:00
|
|
|
belongs_to :conference
|
2014-11-12 12:00:03 +01:00
|
|
|
|
2016-05-24 23:54:46 +05:30
|
|
|
has_paper_trail ignore: [:updated_at], meta: { conference_id: :conference_id }
|
|
|
|
|
|
2014-11-12 12:00:03 +01:00
|
|
|
validates :name, presence: true
|
|
|
|
|
|
2016-04-27 15:27:33 +02:00
|
|
|
mount_uploader :picture, PictureUploader, mount_on: :photo_file_name
|
2014-06-14 20:41:26 +05:30
|
|
|
end
|