ActiveRecord bottom half

Hi Perry,

Perry Smith wrote:

Please see:

Validates_presence_of of polymophic fields - Rails - Ruby-Forum

I may have discovered the error of my ways. Instead of validates_presence_of, should I be using validates_associated ?

What you don't say in your post above is whether or not you're getting the results you expect. If it accomplishes what you're trying to accomplish, use it. Rails typically gives us more than one way to "skin the cat." Without knowing what you're trying to accomplish it's not possible to say whether or not there's an easier / more Railsy way to do it. I assume you've reviewed the documentation on validates_associated at http://api.rubyonrails.org and seen the note re: the potential need to use validates_presence_of on the association itself.

Best regards, Bill