Sha256: 8628fb812af62fc81eaeec478aaf5b050b1800ff0a59e9a531da58ddb8d3c6e8
Contents?: true
Size: 607 Bytes
Versions: 1
Compression:
Stored size: 607 Bytes
Contents
module Phcpress class Articles::Post < ApplicationRecord # For Image Uploads mount_uploader :pstimage, Phcpresspro::PstimageUploader # 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 } validates :psttext, presence: true, length: { minimum: 3 } validates :pststatus, presence: true end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
phcpress-6.6.3 | app/models/phcpress/articles/post.rb |