I\'m trying to make a RoR application for a Hospital so it has patients, doctors, offices, etc.
The problem I\'m having is that, at the patient \"Sign-up\", I\'m not
Remove the following line in class Patient
:
attr_accessor :name, :pID
What happened was that attr_accessor replaced the two database column attributes :name
and :pID
(which were automatically generated) with its own, resulting in two virtual attributes, :name
and :pID
.
Thus, the virtual attributes were being set and validated instead of the corresponding database attributes, which resulted in no errors yet null values in the database.