Pergunta

If I have some CustomValidator, and following validation in model

validates :fieldname, :custom => true

How can I access :fieldname or true? Validator only takes object (def validate(record)) and I can't use EachValidator.

Foi útil?

Solução

OK, I know: self.options[:attributes]

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top