app/models/phcmembers/directory/category.rb in phcmembers-3.0.1 vs app/models/phcmembers/directory/category.rb in phcmembers-4.0.0

- old
+ new

@@ -1,17 +1,12 @@ module Phcmembers - class Directory::Category < ActiveRecord::Base + class Directory::Category < ApplicationRecord # Add Paper Trail has_paper_trail - # Model Relationship - has_many :listings, class_name: 'Directory::Listing', dependent: :destroy - has_many :businesses, class_name: 'Members::Business', :through => :listings - - # Validation for Form Fields - validates :catname, - presence: true, - length: { minimum: 3 } + # Model Relationships + has_many :categorylistings, class_name: 'Phcmembers::Directory::Categorylisting', dependent: :destroy + has_many :listings, class_name: 'Phcmembers::Member::Listing', :through => :categorylistings end end