I am new to rails validation.
I have two fields:
field :feed_entitlements, :type => Array
...
field :alert_news, :type => Boolean, :default => false
I want to put a validation on “alert_news” that requires a count > 0 in “feed_entitlements”. Is this possible using a rails validation? It seems like all examples of validations that I can find are simple “can’t be blank” type problems.
Thanks.
Add to your model this code