app/models/phcpress/article/post.rb in phcpress-10.0.0 vs app/models/phcpress/article/post.rb in phcpress-11.0.0
- old
+ new
@@ -3,11 +3,11 @@
# Clean URL Initialize
extend FriendlyId
# Add Paper Trail
- has_paper_trail :class_name => 'Phcprss::PostVersions'
+ has_paper_trail :class_name => 'Phcpress::PostVersions'
# Image Upload Initialize
mount_uploader :pstimage, Phcpress::PstimageUploader
# Model Relationships
@@ -17,24 +17,24 @@
# Validation for Form Fields
validates :psttitle,
presence: true,
length: { minimum: 3 }
- validates :psttext,
- presence: true,
- length: { minimum: 3 }
+ validates :psttext,
+ presence: true,
+ length: { minimum: 3 }
- validates :pststatus,
- presence: true
+ validates :pststatus,
+ presence: true
- # Clean URL Define
- friendly_id :phcpress_posts_slug, use: [:slugged, :finders]
+ # Clean URL Define
+ friendly_id :phcpress_post_slug, use: [:slugged, :finders]
- # Define for Multiple Records
- def phcpress_posts_slug
- [
- [:psttitle]
- ]
- end
-
+ # Define for Multiple Records
+ def phcpress_post_slug
+ [
+ [:psttitle]
+ ]
end
+
+ end
end