Sha256: 10b1438a6beee4e100982b23f25b2a686ebb34200d31adc43c0fcaccc15ed56a
Contents?: true
Size: 571 Bytes
Versions: 2
Compression:
Stored size: 571 Bytes
Contents
module PhcdevworksTutorials class Tutorial::Post < ApplicationRecord # Clean URL Initialize extend FriendlyId # Relationships belongs_to :category, class_name: 'PhcdevworksTutorials::Tutorial::Category' has_many :steps, class_name: "PhcdevworksTutorials::Tutorial::Step" # Form Fields Validation validates :tutorial_post_title, presence: true # Clean URL Define friendly_id :phcdev_tutorials_post_nice_urls, use: [:slugged, :finders] def phcdev_tutorials_post_nice_urls [:tutorial_post_title] end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
phcdevworks_tutorials-1.1.0 | app/models/phcdevworks_tutorials/tutorial/post.rb |
phcdevworks_tutorials-1.0.2 | app/models/phcdevworks_tutorials/tutorial/post.rb |