Sha256: c912a74aa804f93047bae0314f6c5915e9df9da93c2bbb98aa06c98149dc1312
Contents?: true
Size: 516 Bytes
Versions: 6
Compression:
Stored size: 516 Bytes
Contents
module PhcdevworksScripts class Snippet::Post < ApplicationRecord # Clean URL Initialize extend FriendlyId # Relationships has_many :urls, class_name: 'PhcdevworksScripts::Script::Url' # Form Fields Validation validates :snippet_title, presence: true validates :snippet_code, presence: true # Clean URL Define friendly_id :phcdev_snippet_post_nice_urls, use: [:slugged, :finders] def phcdev_snippet_post_nice_urls [:snippet_title] end end end
Version data entries
6 entries across 6 versions & 1 rubygems