I have a model with doctor and patients with associations:
Class doctor has_may :patients Class patient belongs_to :doctor
I need to make limit of free payment patients and other limit for payed patients. Who can i it?
For now my doctor has no limit patients. It's not right.
You can do it using length validation like this:
Check this answer from @jstejada.