Is there a way to access an ActiveRecord object’s validation list?
for instance:
u = User.find 1
u.attributes.each { |attr| puts attr if u.validates_presence_of?(attr) }
I’m building a test_scaffold generator and I want to access the list of
validations for a model so that I can build the appropriate tests.
Thanks,
-Michael Cowden
StoryRight.com
[email protected]
(443) 519-8662