projects
/
opencantine5
/
opencantine5.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
project home
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
enfants
[opencantine5/opencantine5.git]
/
app
/
models
/
compte.rb
diff --git
a/app/models/compte.rb
b/app/models/compte.rb
index
cbb99ac
..
418534c
100644
(file)
--- a/
app/models/compte.rb
+++ b/
app/models/compte.rb
@@
-4,6
+4,9
@@
class Compte < ApplicationRecord
has_many :contacts, inverse_of: :compte
accepts_nested_attributes_for :contacts, reject_if: proc { |attributes| attributes[:nom].blank? }, allow_destroy: true
+ has_many :enfants
+ has_many :classrooms
+
validates :nom, presence: true
end