Sha256: f45948904bbc006edcdc9170a3a3d50caaa995d3b058b48f5a6e468c527dee2a

Contents?: true

Size: 616 Bytes

Versions: 10

Compression:

Stored size: 616 Bytes

Contents

module Phcpresspro
  class Articles::Post < ApplicationRecord
  
    # For Image Uploads
    mount_uploader :pstimage, Phcpresspro::PstimageUploader
    
    # Relationships
    has_many :connections, class_name: 'Phcpresspro::Modules::Connection', dependent: :destroy
    has_many :categories, class_name: 'Phcpresspro::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

10 entries across 10 versions & 1 rubygems

Version Path
phcpresspro-10.0.0 app/models/phcpresspro/articles/post.rb
phcpresspro-9.1.3 app/models/phcpresspro/articles/post.rb
phcpresspro-9.1.2 app/models/phcpresspro/articles/post.rb
phcpresspro-9.1.1 app/models/phcpresspro/articles/post.rb
phcpresspro-9.1.0 app/models/phcpresspro/articles/post.rb
phcpresspro-9.0.0 app/models/phcpresspro/articles/post.rb
phcpresspro-8.0.6 app/models/phcpresspro/articles/post.rb
phcpresspro-8.0.5 app/models/phcpresspro/articles/post.rb
phcpresspro-8.0.4 app/models/phcpresspro/articles/post.rb
phcpresspro-8.0.3 app/models/phcpresspro/articles/post.rb