|
|
@ -1,6 +1,6 @@ |
|
|
|
module Report::Validation |
|
|
|
module Report::Validation |
|
|
|
extend ProactiveAutoloader |
|
|
|
extend ProactiveAutoloader |
|
|
|
include Report::QueryUtils |
|
|
|
|
|
|
|
# autoload :Dates, 'report/validation/dates' |
|
|
|
# autoload :Dates, 'report/validation/dates' |
|
|
|
# autoload :Integers, 'report/validation/integers' |
|
|
|
# autoload :Integers, 'report/validation/integers' |
|
|
|
# autoload :Sql, 'report/validation/sql' |
|
|
|
# autoload :Sql, 'report/validation/sql' |
|
|
@ -14,7 +14,7 @@ module Report::Validation |
|
|
|
def register_validation(val_method) |
|
|
|
def register_validation(val_method) |
|
|
|
const_name = val_method.to_s.camelize |
|
|
|
const_name = val_method.to_s.camelize |
|
|
|
begin |
|
|
|
begin |
|
|
|
val_module = Report::Validation.const_get const_name |
|
|
|
val_module = engine::Validation.const_get const_name |
|
|
|
singleton_class.send(:include, val_module) |
|
|
|
singleton_class.send(:include, val_module) |
|
|
|
val_method = "validate_" + val_method.to_s.pluralize |
|
|
|
val_method = "validate_" + val_method.to_s.pluralize |
|
|
|
if method(val_method) |
|
|
|
if method(val_method) |
|
|
@ -44,4 +44,9 @@ module Report::Validation |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def self.included(klass) |
|
|
|
|
|
|
|
super |
|
|
|
|
|
|
|
klass.send :include, Report::QueryUtils |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
end |
|
|
|
end |
|
|
|