Sha256: a655881c07cf8221a15f753c6e4e613d6965f15b5ebceefed841d42bb2081d46

Contents?: true

Size: 561 Bytes

Versions: 13

Compression:

Stored size: 561 Bytes

Contents

module PhcdevworksMembers
  class Directory::Category < ApplicationRecord

    # Clean URL Initialize
    extend FriendlyId

    # Paper Trail Initialize
    has_paper_trail :class_name => 'PhcdevworksMembers::CategoryVersions'

    # Relationships
    has_and_belongs_to_many :listings, class_name: 'PhcdevworksMembers::Member::Listing', :join_table => 'categories_listings', :dependent => :destroy

    # Form Fields Validation
    validates :category_name,
      presence: true

    # Clean URL Define
    friendly_id :category_name, use: :slugged

  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
phcdevworks_members-2.1.0 app/models/phcdevworks_members/directory/category.rb
phcdevworks_members-2.0.0 app/models/phcdevworks_members/directory/category.rb
phcdevworks_members-1.0.1 app/models/phcdevworks_members/directory/category.rb
phcdevworks_members-1.0.0 app/models/phcdevworks_members/directory/category.rb
phcdevworks_members-0.10.0 app/models/phcdevworks_members/directory/category.rb
phcdevworks_members-0.8.0 app/models/phcdevworks_members/directory/category.rb
phcdevworks_members-0.7.0 app/models/phcdevworks_members/directory/category.rb
phcdevworks_members-0.6.0 app/models/phcdevworks_members/directory/category.rb
phcdevworks_members-0.5.0 app/models/phcdevworks_members/directory/category.rb
phcdevworks_members-0.4.0 app/models/phcdevworks_members/directory/category.rb
phcdevworks_members-0.3.0 app/models/phcdevworks_members/directory/category.rb
phcdevworks_members-0.2.0 app/models/phcdevworks_members/directory/category.rb
phcdevworks_members-0.1.0 app/models/phcdevworks_members/directory/category.rb