Sha256: 0f1edabf81a03a55e271114925195b8638bcad22a9b49af21b641558e7f59640
Contents?: true
Size: 604 Bytes
Versions: 11
Compression:
Stored size: 604 Bytes
Contents
module Phcpress class Articles::Post < ApplicationRecord # For Image Uploads mount_uploader :pstimage, Phcpress::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
11 entries across 11 versions & 1 rubygems