Sha256: b777d6e4cfbfb03049de0181f2fb76b7e9d61a7ebb4959e343c90f4cd67bea39

Contents?: true

Size: 562 Bytes

Versions: 2

Compression:

Stored size: 562 Bytes

Contents

module PhcdevworksTutorials
  class Command::Item < ApplicationRecord

    # Paper Trail Initialize
    has_paper_trail :class_name => 'PhcdevworksTutorials::CommandItemVersions'

    # Image Upload
    has_one_attached :item_image

    # Relationships
    belongs_to :user, class_name: "PhcdevworksAccounts::User"
    belongs_to :post, class_name: "Command::Post"
    has_many :categories, class_name: "Tutorial::Category", :through => :post
    belongs_to :optimization, class_name: "PhcdevworksCoreModules::Marketing::Optimization", optional: true

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
phcdevworks_tutorials-8.0.1 app/models/phcdevworks_tutorials/command/item.rb
phcdevworks_tutorials-8.0.0 app/models/phcdevworks_tutorials/command/item.rb