- working party
- working friend - working attendent
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
class Attendent < ApplicationRecord
|
||||
belongs_to :parties
|
||||
belongs_to :friends
|
||||
belongs_to :party
|
||||
belongs_to :friend
|
||||
end
|
||||
|
||||
@ -1,4 +1,7 @@
|
||||
class Friend < ApplicationRecord
|
||||
has_many :attendents
|
||||
has_many :parties, through: :attendents
|
||||
|
||||
validates :firstname, :lastname, :email, :telefon, presence: true
|
||||
|
||||
def fullname
|
||||
|
||||
@ -1,3 +1,6 @@
|
||||
class Party < ApplicationRecord
|
||||
has_many :attendents
|
||||
has_many :friends, through: :attendents
|
||||
|
||||
validates :title, :location, :start_date, :start_time, :status, presence: true
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user