Sha256: f701234106d729c04e8db39e651bcdf9b665b1d411440a129210c39969b11439

Contents?: true

Size: 408 Bytes

Versions: 4

Compression:

Stored size: 408 Bytes

Contents

module Cmor::Showcase
  class Category < ApplicationRecord
    include ActsAsPublished::ActiveRecord

    has_many :items, dependent: :destroy
    has_one_attached :image

    acts_as_list
    acts_as_published

    validates :locale, presence: true
    validates :identifier, presence: true, uniqueness: true
    validates :name, presence: true, uniqueness: true

    def human
      name
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
cmor_showcase-0.0.36.pre app/models/cmor/showcase/category.rb
cmor_showcase-0.0.35.pre app/models/cmor/showcase/category.rb
cmor_showcase-0.0.34.pre app/models/cmor/showcase/category.rb
cmor_showcase-0.0.33.pre app/models/cmor/showcase/category.rb