Problem with STI and validation


#1

OK. Here’s another one on STI (thanks for the help of all of you with my
previous STI question, and I promise to update the wiki with the info).
I’m having a prob with validation with the sub-classes. It’s a bit
long-winded to explain, but I’ll post all the logs and code if there’s
no obvious answers. Basically, however, I have validation on the main
model (Person, presence of :name). This works no prob, sending you back
to the form with the usual error and fields all filled in.

However for the subclass, Manager, it chucks you back to the form, but
without an error (not even anything in the log), and without the fields
pre-populated. I’ll try a few more experiments to see if I come up with
more useful info but wondered if anyone else had experienced anything
similar, and could identify the prob.

Thanks in advance,
Chris T


#2

Sorry!. Please ignore this. My bad. Stupid error with render.
Chris T
ChrisT wrote:

OK. Here’s another one on STI (thanks for the help of all of you with my
previous STI question, and I promise to update the wiki with the info).
I’m having a prob with validation with the sub-classes. It’s a bit
long-winded to explain, but I’ll post all the logs and code if there’s
no obvious answers. Basically, however, I have validation on the main
model (Person, presence of :name). This works no prob, sending you back
to the form with the usual error and fields all filled in.

However for the subclass, Manager, it chucks you back to the form, but
without an error (not even anything in the log), and without the fields
pre-populated. I’ll try a few more experiments to see if I come up with
more useful info but wondered if anyone else had experienced anything
similar, and could identify the prob.

Thanks in advance,
Chris T