clean up profile generation (wip)
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user