module Elabs class License < ApplicationRecord self.table_name = 'licenses' validates :name, presence: true validates :url, presence: true validates :icon, presence: true has_many :albums has_many :articles has_many :notes has_many :projects has_many :uploads scope :for_list, -> { order(:name).pluck(:name, :id) } end end