debian-mirror-gitlab/app/models/appearance.rb

15 lines
469 B
Ruby
Raw Normal View History

2016-04-02 18:10:28 +05:30
class Appearance < ActiveRecord::Base
2016-11-03 12:29:30 +05:30
include CacheMarkdownField
cache_markdown_field :description
2016-04-02 18:10:28 +05:30
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
2017-08-17 22:00:37 +05:30
has_many :uploads, as: :model, dependent: :destroy
2016-04-02 18:10:28 +05:30
end