Sha256: 31f0165669bfe17a2090f90e4a8c0629ec5e94fa57ee56fff716f25456ad9593
Contents?: true
Size: 281 Bytes
Versions: 9
Compression:
Stored size: 281 Bytes
Contents
class ForumCategory < ApplicationRecord extend FriendlyId friendly_id :name, use: :slugged scope :sorted, ->{ order(name: :asc) } validates :name, :slug, :color, presence: true def color colour = super colour.start_with?("#") ? colour : "##{colour}" end end
Version data entries
9 entries across 9 versions & 1 rubygems