summaryrefslogtreecommitdiff
path: root/app/models/company.rb
blob: 0fb5cd8f3b8bbda7c302714f468b21d1e7285947 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# frozen_string_literal: true

# Company
# name: string
# short_name: string
# country: string
class Company < ApplicationRecord
  validates :short_name, uniqueness: true
  validates :short_name, presence: true
  validates :name, presence: true
  validates :country, presence: true

  has_one_attached :logo

  paginates_per 10

  def to_param
    short_name
  end
end