Welcome to mirror list, hosted at ThFree Co, Russian Federation.

appearance.rb « models « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 4528760fefabdf79ff365fca8fdc77eb11021155 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# == Schema Information
#
# Table name: appearances
#
#  id          :integer          not null, primary key
#  title       :string
#  description :text
#  header_logo :string
#  logo        :string
#  created_at  :datetime         not null
#  updated_at  :datetime         not null
#

class Appearance < ActiveRecord::Base
  validates :title,       presence: true
  validates :description, presence: true
  validates :logo,        file_size: { maximum: 1.megabyte }
  validates :header_logo, file_size: { maximum: 1.megabyte }

  mount_uploader :logo,         AttachmentUploader
  mount_uploader :header_logo,  AttachmentUploader
end