On Friday, May 13, 2011 6:10:19 AM UTC-6, Lille wrote:
end
def some_custom_validation
<references to various instance methods of parent, e.g., ref_1 &
ref_2, here>
end
end
Wow, getting fancy there. Just a little off topic question, any reason
why
you don’t want to use the ActiveModel::Validator module and the #validates_with helper to break-out/organize your custom validations?
Sure, just a few questions. If you manually define your methods #ref_1
and #ref_2 (and just put logging code in their implementations) as opposed
to
using delegation methods, do they get called? Also, what is the exact
error
message or indication of failure? Can you provide any more code? Are the
delegations to a class where the parent (that includes your validation
module) has_many, has_one, or belongs_to the associated model?
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.