osem-fcy/app/models/sponsor.rb

28 lines
757 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2021-02-20 09:57:27 -08:00
# == Schema Information
#
# Table name: sponsors
#
# id :bigint not null, primary key
# description :text
# logo_file_name :string
# name :string
# picture :string
# website_url :string
# created_at :datetime
# updated_at :datetime
# conference_id :integer
# sponsorship_level_id :integer
#
class Sponsor < ApplicationRecord
2014-06-05 17:51:22 +05:30
belongs_to :sponsorship_level
belongs_to :conference
has_paper_trail ignore: [:updated_at], meta: { conference_id: :conference_id }
2016-04-27 15:55:39 +02:00
mount_uploader :picture, PictureUploader, mount_on: :logo_file_name
2016-04-07 14:38:36 -06:00
validates :name, :website_url, :sponsorship_level, presence: true
2014-06-05 17:51:22 +05:30
end