Sha256: 661f1969ad01ff962d28d08f91e40bfa2dacd160438f9b96c8a43da93e7b9813

Contents?: true

Size: 412 Bytes

Versions: 10

Compression:

Stored size: 412 Bytes

Contents

module Phcmemberspro
  class Directory::Category < ApplicationRecord

    # Add Paper Trail
    has_paper_trail

    # Model Relationships
    has_many :categorylistings, class_name: 'Phcmemberspro::Directory::Categorylisting', dependent: :destroy
    has_many :listings, class_name: 'Phcmemberspro::Member::Listing', :through => :categorylistings

    validates :catname,
      length: { minimum: 3 }

  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
phcmemberspro-17.1.4 app/models/phcmemberspro/directory/category.rb
phcmemberspro-17.1.3 app/models/phcmemberspro/directory/category.rb
phcmemberspro-17.1.2 app/models/phcmemberspro/directory/category.rb
phcmemberspro-17.1.1 app/models/phcmemberspro/directory/category.rb
phcmemberspro-17.1.0 app/models/phcmemberspro/directory/category.rb
phcmemberspro-17.0.3 app/models/phcmemberspro/directory/category.rb
phcmemberspro-17.0.2 app/models/phcmemberspro/directory/category.rb
phcmemberspro-17.0.1 app/models/phcmemberspro/directory/category.rb
phcmemberspro-17.0.0 app/models/phcmemberspro/directory/category.rb
phcmemberspro-16.0.2 app/models/phcmemberspro/directory/category.rb