I’m aware of validates_associated, but I’m not sure it does what I need it to do…
I have a model Photo which has_one Attachment — I need to make sure the photo has an associated, valid, saved attachment before the photo itself saves.
Does validates_associated cover all of that, or is there a different/better way to do this?
Thanks!
You’re looking for
validates_presence_ofin addition tovalidates_associated. As noted in the API: