docbrown/app/models/profile_field_group.rb
Michael Kohl 161ed7d55e
[deploy] Introduce ProfileFieldGroup model (#10007)
* Introduce ProfileFieldGroup model

* Make profile_fields_groups name column unique

* Fix some specs

* feat: allow the page to work again

* Add guard clause to data update script

* Remove unused file

* Fix specs

* Add foreign key

Co-authored-by: Ridhwana <ridhwana.khan16@gmail.com>
2020-08-28 10:51:33 +07:00

5 lines
149 B
Ruby

class ProfileFieldGroup < ApplicationRecord
has_many :profile_fields, dependent: :nullify
validates :name, presence: true, uniqueness: true
end