Sha256: 5e0837cba65651e843f749f25fcf9d48b324607f3a89614eacc8cfa1e155236f
Contents?: true
Size: 597 Bytes
Versions: 12
Compression:
Stored size: 597 Bytes
Contents
module Phcmemberspro class Directory::Category < ApplicationRecord # Clean URL Initialize extend FriendlyId # Paper Trail Initialize has_paper_trail :class_name => 'Phcmemberspro::CategoryVersions' # Relationships has_and_belongs_to_many :listings, class_name: 'Phcmemberspro::Member::Listing', :join_table => 'categories_listings', :dependent => :destroy # Form Fields Validation validates :category_name, presence: true # Clean URL Define friendly_id :phc_nice_url_slug, use: [:slugged, :finders] def phc_nice_url_slug [:category_name] end end end
Version data entries
12 entries across 12 versions & 1 rubygems