Relationships between the CAF bits now in place

Rename the type field to kind, type is reserved
This commit is contained in:
2023-02-12 07:01:39 +00:00
parent 410a59fa04
commit d96050c4fb
9 changed files with 55 additions and 10 deletions

View File

@@ -1,5 +1,5 @@
class Company < ApplicationRecord
has_many :cafs
has_many :cafs, dependent: :destroy
has_and_belongs_to_many :users
validates :name, presence: true
validates :name, uniqueness: true