Sha256: 6c7de6038ebd33291b0ee9a84b4fccdaa7e617e3dc5fd4240b41f1272d9f2fb7
Contents?: true
Size: 488 Bytes
Versions: 10
Compression:
Stored size: 488 Bytes
Contents
module Binda class Board < ApplicationRecord include FieldableAssociations belongs_to :structure, required: true validates :name, presence: true validates :slug, uniqueness: true # Slug extend FriendlyId friendly_id :name, use: [:slugged, :finders] # Friendly id preference on slug generation # # Method inherited from friendly id # @see https://github.com/norman/friendly_id/issues/436 def should_generate_new_friendly_id? slug.blank? end end end
Version data entries
10 entries across 10 versions & 1 rubygems