Sha256: 8fb2e93b303010bba348a8e57d42adbadc13d78e5435ca3d72f9fc46b72aceed

Contents?: true

Size: 652 Bytes

Versions: 16

Compression:

Stored size: 652 Bytes

Contents

module PhcdevworksPortfolio
  class Project::Category < ApplicationRecord

    # Clean URL Initialize
    extend FriendlyId

    # Paper Trail Initialize
    has_paper_trail :class_name => 'PhcdevworksPortfolio::ProjectCategoryVersions'

    # Relationships
    has_and_belongs_to_many :posts, class_name: "Project::Post", :join_table => "phcdevworks_portfolio_categories_posts", :dependent => :destroy
    belongs_to :user, class_name: "PhcdevworksAccounts::User"

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

    def phcdev_project_category_nice_urls
      [:category_name]
    end

  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
phcdevworks_portfolio-4.7.0 app/models/phcdevworks_portfolio/project/category.rb
phcdevworks_portfolio-4.6.2 app/models/phcdevworks_portfolio/project/category.rb
phcdevworks_portfolio-4.6.1 app/models/phcdevworks_portfolio/project/category.rb
phcdevworks_portfolio-4.6.0 app/models/phcdevworks_portfolio/project/category.rb
phcdevworks_portfolio-4.5.0 app/models/phcdevworks_portfolio/project/category.rb
phcdevworks_portfolio-4.4.0 app/models/phcdevworks_portfolio/project/category.rb
phcdevworks_portfolio-4.3.0 app/models/phcdevworks_portfolio/project/category.rb
phcdevworks_portfolio-4.2.0 app/models/phcdevworks_portfolio/project/category.rb
phcdevworks_portfolio-4.1.0 app/models/phcdevworks_portfolio/project/category.rb
phcdevworks_portfolio-4.0.0 app/models/phcdevworks_portfolio/project/category.rb
phcdevworks_portfolio-3.1.1 app/models/phcdevworks_portfolio/project/category.rb
phcdevworks_portfolio-3.1.0 app/models/phcdevworks_portfolio/project/category.rb
phcdevworks_portfolio-3.0.4 app/models/phcdevworks_portfolio/project/category.rb
phcdevworks_portfolio-3.0.3 app/models/phcdevworks_portfolio/project/category.rb
phcdevworks_portfolio-3.0.2 app/models/phcdevworks_portfolio/project/category.rb
phcdevworks_portfolio-3.0.0 app/models/phcdevworks_portfolio/project/category.rb