1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-01 12:24:28 +01:00
fab-manager/app/models/machine_category.rb

9 lines
358 B
Ruby
Raw Normal View History

2022-12-16 18:43:38 +01:00
# frozen_string_literal: true
# MachineCategory used to categorize Machines.
class MachineCategory < ApplicationRecord
has_many :machines, dependent: :nullify
accepts_nested_attributes_for :machines, allow_destroy: true
2023-02-24 17:26:55 +01:00
has_many :plan_limitations, dependent: :destroy, inverse_of: :machine_category, foreign_type: 'limitable_type', as: :limitable
2022-12-16 18:43:38 +01:00
end