Sha256: 2a930e3b726a0a4781ee157a86a2d866a8f8957dcda2dc03303e3dfdb49b4b26
Contents?: true
Size: 576 Bytes
Versions: 7
Compression:
Stored size: 576 Bytes
Contents
module Phccodesnipper class Script::Snippet < ApplicationRecord # Include Core Validations include Phccorehelpers::Validations # Clean URL Initialize extend FriendlyId # Relationships has_many :urls, class_name: 'Phccodesnipper::Script::Url' # Form Fields Validation validates :snippet_title, presence: true validates :snippet_code, presence: true # Clean URL Define friendly_id :phc_nice_url_slug, use: [:slugged, :finders] def phc_nice_url_slug [ [:snippet_title] ] end end end
Version data entries
7 entries across 7 versions & 1 rubygems