clean up profile generation (wip)

This commit is contained in:
2023-01-20 14:59:34 +02:00
parent 82358d8642
commit caba7630cf
9 changed files with 78 additions and 58 deletions

View File

@ -9,8 +9,8 @@ class Member < ApplicationRecord
has_many :entities
has_many :profiles
Profile.types.each do |kind|
define_method :kind do
Profile.kinds.each do |kind|
define_method :"#{kind}_profile" do
Profile.where( member_id: self.id).where(kind: kind).first
end
end