Sha256: a1628f0a4718a7577f722a5be074169ff989ca744458e79fb18644e8a6ffb053
Contents?: true
Size: 326 Bytes
Versions: 8
Compression:
Stored size: 326 Bytes
Contents
module Panda module Core module Sluggable extend ActiveSupport::Concern included do before_validation :generate_slug validates :slug, presence: true, uniqueness: true end private def generate_slug self.slug ||= title.to_s.parameterize end end end end
Version data entries
8 entries across 8 versions & 2 rubygems