문제

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.

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top