Method: Koujou::CustomValidation.stub_custom_validations!

Defined in:
lib/koujou/custom_validation.rb

.stub_custom_validations!(instance) ⇒ Object

This just goes in and redefines any custom validation methods. Since we can’t really ascertain what the intent of those are when koujou runs, it seems like stubbing them out is the most logical choice.



8
9
10
11
12
# File 'lib/koujou/custom_validation.rb', line 8

def self.stub_custom_validations!(instance)
  instance.class.custom_validations.each do |v|
    instance.class.module_eval { define_method(v.name.to_s) { true } }
  end
end