Specify user modifiable ATTRIBUTES

This commit is contained in:
2024-11-22 15:48:09 +01:00
parent 1d439928e2
commit bdc4ec4644
3 changed files with 5 additions and 2 deletions

View File

@@ -1,4 +1,6 @@
class Unit < ApplicationRecord
ATTRIBUTES = [:symbol, :name, :multiplier, :base_id]
belongs_to :user, optional: true
belongs_to :base, optional: true, class_name: "Unit"
has_many :subunits, class_name: "Unit", dependent: :restrict_with_error, inverse_of: :base