Files
mpa-blog/app/models/friend.rb
Wild Karl-Heinz 6b96c100a5 - working party
- working friend
- working attendent
2025-11-22 20:59:19 +01:00

12 lines
232 B
Ruby

class Friend < ApplicationRecord
has_many :attendents
has_many :parties, through: :attendents
validates :firstname, :lastname, :email, :telefon, presence: true
def fullname
[ firstname, lastname ].join(' ')
end
end