app/models/phcpress/articles/post.rb in phcpress-8.0.0 vs app/models/phcpress/articles/post.rb in phcpress-9.0.0

- old
+ new

@@ -1,24 +1,30 @@ module Phcpress class Articles::Post < ApplicationRecord - # For Image Uploads + # Image Upload Initialize mount_uploader :pstimage, Phcpress::PstimageUploader - # Relationships + # Clean URL Initialize + extend FriendlyId + + # Paper_tail Initialize + has_paper_trail + + # Model Relationships has_many :connections, class_name: 'Phcpress::Modules::Connection', dependent: :destroy has_many :categories, class_name: 'Phcpress::Modules::Category', :through => :connections # Validation for Form Fields validates :psttitle, - presence: true, - length: { minimum: 3 } + presence: true, + length: { minimum: 3 } validates :psttext, - presence: true, - length: { minimum: 3 } + presence: true, + length: { minimum: 3 } validates :pststatus, - presence: true + presence: true end end