Sha256: 29e2350abbcf8f4233a7dc4c790194ae03e48ba39c864fa792015848dea6ca15

Contents?: true

Size: 393 Bytes

Versions: 6

Compression:

Stored size: 393 Bytes

Contents

module Phcpresspro
  class Modules::Category < ApplicationRecord

    # Relationships
    has_many :connections, class_name: 'Phcpresspro::Modules::Connection', dependent: :destroy
    has_many :posts, class_name: 'Phcpresspro::Modules::Category', :through => :connections

    # Validation for Form Fields
    validates :catname,
      presence: true,
      length: { minimum: 3 }

  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
phcpresspro-12.0.2 app/models/phcpresspro/modules/category.rb
phcpresspro-12.0.1 app/models/phcpresspro/modules/category.rb
phcpresspro-12.0.0 app/models/phcpresspro/modules/category.rb
phcpresspro-11.0.1 app/models/phcpresspro/modules/category.rb
phcpresspro-11.0.0 app/models/phcpresspro/modules/category.rb
phcpresspro-10.0.1 app/models/phcpresspro/modules/category.rb