Sha256: 36957b53a2f4c2c4b3eefff16726b888c487086f90b3ef909d0f547550562c71
Contents?: true
Size: 533 Bytes
Versions: 9
Compression:
Stored size: 533 Bytes
Contents
module PhcdevworksTutorials class Tutorial::Category < ApplicationRecord # Clean URL Initialize extend FriendlyId #Relationships has_many :posts, class_name: 'PhcdevworksTutorials::Tutorial::Post' # Form Fields Validation validates :tutorial_category_name, presence: true, uniqueness: true # Clean URL Define friendly_id :phcdev_tutorials_category_nice_urls, use: [:slugged, :finders] def phcdev_tutorials_category_nice_urls [:tutorial_category_name] end end end
Version data entries
9 entries across 9 versions & 1 rubygems