app/models/phcpress/article/post.rb in phcpress-56.4.0 vs app/models/phcpress/article/post.rb in phcpress-57.0.0
- old
+ new
@@ -1,32 +1,32 @@
module Phcpress
- class Article::Post < ApplicationRecord
+ class Article::Post < ApplicationRecord
- # Clean URL Initialize
- extend FriendlyId
+ # Clean URL Initialize
+ extend FriendlyId
- # Paper Trail Initialize
- has_paper_trail :class_name => 'Phcpress::PostVersions'
+ # Paper Trail Initialize
+ has_paper_trail :class_name => 'Phcpress::PostVersions'
- # Image Upload
- has_one_attached :post_image
+ # Image Upload
+ has_one_attached :post_image
- # Relationships
- has_and_belongs_to_many :categories, class_name: 'Phcpress::Article::Category', :join_table => 'categories_posts'
- belongs_to :user, class_name: 'Phcaccounts::User'
+ # Relationships
+ has_and_belongs_to_many :categories, class_name: 'Phcpress::Article::Category', :join_table => 'categories_posts'
+ belongs_to :user, class_name: 'PhcdevworksAccountsDevise::User'
- # Form Fields Validation
- validates :post_title,
- presence: true
+ # Form Fields Validation
+ validates :post_title,
+ presence: true
- validates :post_text,
- presence: true
+ validates :post_text,
+ presence: true
- # Clean URL Define
- friendly_id :phcpress_post_slug, use: [:slugged, :finders]
+ # Clean URL Define
+ friendly_id :phcpress_post_slug, use: [:slugged, :finders]
- def phcpress_post_slug
- [:post_title]
- end
+ def phcpress_post_slug
+ [:post_title]
+ end
- end
+ end
end