programming in Ruby on Rails

0

I have a form and I include a médicos table, and in this table there is a enum field where you can choose the cooperativa option, but I have to check in another cooperativa table if this doctor has a cooperativa .

In validation, how do I read these two tables and check that médico has cooperativa , otherwise I have to show a message saying that this doctor does not have cooperativa .

    
asked by anonymous 14.11.2017 / 15:50

0 answers