Sha256: 07391606114ff3c0df80c057be9fe730e5fc8c8d73949ae836236d80aaa71155

Contents?: true

Size: 480 Bytes

Versions: 22

Compression:

Stored size: 480 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

    # slugs
    extend FriendlyId
    friendly_id :name, use: :slugged

    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

22 entries across 22 versions & 1 rubygems

Version Path
cmor_showcase-0.0.60.pre app/models/cmor/showcase/category.rb
cmor_showcase-0.0.59.pre app/models/cmor/showcase/category.rb
cmor_showcase-0.0.58.pre app/models/cmor/showcase/category.rb
cmor_showcase-0.0.57.pre app/models/cmor/showcase/category.rb
cmor_showcase-0.0.56.pre app/models/cmor/showcase/category.rb
cmor_showcase-0.0.55.pre app/models/cmor/showcase/category.rb
cmor_showcase-0.0.54.pre app/models/cmor/showcase/category.rb
cmor_showcase-0.0.53.pre app/models/cmor/showcase/category.rb
cmor_showcase-0.0.52.pre app/models/cmor/showcase/category.rb
cmor_showcase-0.0.51.pre app/models/cmor/showcase/category.rb
cmor_showcase-0.0.50.pre app/models/cmor/showcase/category.rb
cmor_showcase-0.0.49.pre app/models/cmor/showcase/category.rb
cmor_showcase-0.0.48.pre app/models/cmor/showcase/category.rb
cmor_showcase-0.0.45.pre app/models/cmor/showcase/category.rb
cmor_showcase-0.0.44.pre app/models/cmor/showcase/category.rb
cmor_showcase-0.0.43.pre app/models/cmor/showcase/category.rb
cmor_showcase-0.0.42.pre app/models/cmor/showcase/category.rb
cmor_showcase-0.0.41.pre app/models/cmor/showcase/category.rb
cmor_showcase-0.0.40.pre app/models/cmor/showcase/category.rb
cmor_showcase-0.0.39.pre app/models/cmor/showcase/category.rb