Sha256: 7a28657d7a5d00c5b32452028f784f20d247b23e39a410508994ea0928db221e
Contents?: true
Size: 600 Bytes
Versions: 20
Compression:
Stored size: 600 Bytes
Contents
require 'babosa' module C80Yax class Cat < ActiveRecord::Base include C80Yax::Mixins::Cat::Database validates :title, presence: true, uniqueness: true, length: { in: 6..50 } has_and_belongs_to_many :strsubcats mount_uploader :image, IcatUploader extend FriendlyId friendly_id :slug_candidates, :use => :slugged def slug_candidates [:title] + Array.new(6) {|index| [:title, index+2]} end def normalize_friendly_id(input) input.to_s.to_slug.normalize(transliterations: :russian).to_s end end end
Version data entries
20 entries across 20 versions & 1 rubygems