Noosfero/noosfero

View on GitHub
plugins/products/lib/ext/profile.rb

Summary

Maintainability
A
0 mins
Test Coverage
require_dependency "profile"

class Profile
  has_many :products, foreign_key: :profile_id, dependent: :destroy, class_name: "ProductsPlugin::Product"
  has_many :product_categories, through: :products, class_name: "ProductsPlugin::ProductCategory"
  has_many :inputs, through: :products, class_name: "ProductsPlugin::Input"
  has_many :production_costs, as: :owner, class_name: "ProductsPlugin::ProductionCost"
end