Sha256: c0473baa187b89a7cb39b3a2c04fa83afa47eb7b9e226af5aa7016abb98fffac

Contents?: true

Size: 721 Bytes

Versions: 55

Compression:

Stored size: 721 Bytes

Contents

module Phcpress
  class Modules::Category < ApplicationRecord

    # Clean URL Initialize
    extend FriendlyId

    # Add Paper Trail
    has_paper_trail :class_name => 'Phcpress::CategoryVersions'

    # 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 }

    # Clean URL Define
    friendly_id :phcpress_category_slug, use: [:slugged, :finders]

    # Define for Multiple Records
    def phcpress_category_slug
      [
        [:catname]
      ]
    end

  end
end

Version data entries

55 entries across 55 versions & 1 rubygems

Version Path
phcpress-31.2.0 app/models/phcpress/modules/category.rb
phcpress-31.1.0 app/models/phcpress/modules/category.rb
phcpress-31.0.0 app/models/phcpress/modules/category.rb
phcpress-30.0.0 app/models/phcpress/modules/category.rb
phcpress-29.0.0 app/models/phcpress/modules/category.rb
phcpress-28.0.0 app/models/phcpress/modules/category.rb
phcpress-27.0.0 app/models/phcpress/modules/category.rb
phcpress-26.0.1 app/models/phcpress/modules/category.rb
phcpress-26.0.0 app/models/phcpress/modules/category.rb
phcpress-25.1.0 app/models/phcpress/modules/category.rb
phcpress-25.0.0 app/models/phcpress/modules/category.rb
phcpress-24.0.0 app/models/phcpress/modules/category.rb
phcpress-23.2.0 app/models/phcpress/modules/category.rb
phcpress-23.1.0 app/models/phcpress/modules/category.rb
phcpress-23.0.0 app/models/phcpress/modules/category.rb
phcpress-22.0.1 app/models/phcpress/modules/category.rb
phcpress-22.0.0 app/models/phcpress/modules/category.rb
phcpress-21.0.0 app/models/phcpress/modules/category.rb
phcpress-20.0.0 app/models/phcpress/modules/category.rb
phcpress-19.0.1 app/models/phcpress/modules/category.rb