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

Version Path
phcpress-7.1.2 app/models/phcpress/articles/post.rb
phcpress-7.1.1 app/models/phcpress/articles/post.rb
phcpress-7.1.0 app/models/phcpress/articles/post.rb
phcpress-7.0.0 app/models/phcpress/articles/post.rb
phcpress-6.7.3 app/models/phcpress/articles/post.rb
phcpress-6.7.2 app/models/phcpress/articles/post.rb
phcpress-6.7.1 app/models/phcpress/articles/post.rb
phcpress-6.7.0 app/models/phcpress/articles/post.rb
phcpress-6.6.6 app/models/phcpress/articles/post.rb
phcpress-6.6.5 app/models/phcpress/articles/post.rb
phcpress-6.6.4 app/models/phcpress/articles/post.rb