Sha256: 48222d232d927d5ff6584d4cf7ce81cab37ccb2f3342580e6d1b126cec4f4179
Contents?: true
Size: 504 Bytes
Versions: 3
Compression:
Stored size: 504 Bytes
Contents
module Phccodesnipper class Script::Snippet < ApplicationRecord # 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
3 entries across 3 versions & 1 rubygems