Alternate method for deprecated “validates_associated” method in ruby in rails

As you can see at http://apidock.com/rails/ActiveModel/Validations/ClassMethods/validates_associated

This method has been deprecated.

I want to know the correct method that can be used in its place to
validate associated models.

Thanks Neelesh