plataformatec/simple_form — pull request #746 by mstallard (2013-02-18 18:14:57+00:00)
Title: Check for validators using an instance method rather than a class method

Hello!

I'm currently working on a project where we're using basic presenter objects built with a SimpleDelegator wrapper around ActiveRecord models. We noticed that SimpleForm was using the class method 'validators_on' to check for validators on a given field/attribute. This is fine when you're using ActiveRecord models directly, but it falls over when you pass a delegator to a view. By using the '_validators' instance method instead, we were able to get around this problem.

Hope this meets your approval!

Best,

Mike