Sha256: 5728ed206625a8c9bab0eff1232b4d61b946c3d610ac80e6749f89320024c540

Contents?: true

Size: 483 Bytes

Versions: 5

Compression:

Stored size: 483 Bytes

Contents

module Phcpress
  class Modules::Category < ApplicationRecord

    # Clean URL Initialize
    extend FriendlyId

    # Paper_tail Initialize
    has_paper_trail

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

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

  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
phcpress-10.0.0 app/models/phcpress/modules/category.rb
phcpress-9.1.2 app/models/phcpress/modules/category.rb
phcpress-9.1.1 app/models/phcpress/modules/category.rb
phcpress-9.1.0 app/models/phcpress/modules/category.rb
phcpress-9.0.0 app/models/phcpress/modules/category.rb