Sha256: 1e6b9bc13f826b20804cf5edf2a051a88aae8736f36ce4ea68863720a207fdfc

Contents?: true

Size: 629 Bytes

Versions: 1

Compression:

Stored size: 629 Bytes

Contents

module PhcdevworksPortfolio
  class Project::Type < ApplicationRecord

    # Clean URL Initialize
    extend FriendlyId

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

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

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

    def project_type_nice_urls
      [:project_type_name]
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
phcdevworks_portfolio-9.0.0 app/models/phcdevworks_portfolio/project/type.rb