Hi,
Is there any way to specify a a validation rule or something for the
"has_many’ relationship so that it would count the related objects?
For e.g. I want my Foo object to have maximum of 5 Bar objects in
has_many relationship.
M.
Hi,
Is there any way to specify a a validation rule or something for the
"has_many’ relationship so that it would count the related objects?
For e.g. I want my Foo object to have maximum of 5 Bar objects in
has_many relationship.
M.
I suppose you could write a custom validator to ensure that no more than
5
child objects exist.
On Sun, Jul 5, 2009 at 5:12 PM, Michal B. <
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs