Sha256: 57deb11ecda1952e5c794177d4d1a75be7adbcba9a7c7c3bcaa9c6fbb44a05e3
Contents?: true
Size: 462 Bytes
Versions: 1
Compression:
Stored size: 462 Bytes
Contents
module Cmor module Testimonials class Category < ActiveRecord::Base has_many :testimonials, -> { order(position: :asc) }, dependent: :destroy validates :locale, presence: true, inclusion: { in: I18n.available_locales.map(&:to_s) } validates :identifier, presence: true, uniqueness: { scope: [ :locale ] } validates :name, presence: true, uniqueness: { scope: [ :locale ] } def human name end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
cmor_testimonials-0.0.8.pre | app/models/cmor/testimonials/category.rb |