fixing warnings

pull/6827/head
Gregor Schmidt 14 years ago
parent fee9b1d0e3
commit 114ea9e561
  1. 6
      app/models/report/operator.rb
  2. 4
      app/models/report/validation.rb

@ -240,9 +240,9 @@ class Report::Operator
validation_methods = values.delete(:validate)
register_validations(validation_methods) unless validation_methods.nil?
values.each do |key, value|
metaclass.class_eval { define_method(key) { value } }
singleton_class.class_eval { define_method(key) { value } }
end
metaclass.class_eval(&block) if block
singleton_class.class_eval(&block) if block
end
def to_operator
@ -280,4 +280,4 @@ class Report::Operator
# Done with class method definition, let's initialize the operators
load
end
end

@ -9,7 +9,7 @@ module Report::Validation
const_name = val_method.to_s.camelize
begin
val_module = Report::Validation.const_get const_name
metaclass.send(:include, val_module)
singleton_class.send(:include, val_module)
val_method = "validate_" + val_method.to_s.pluralize
if method(val_method)
validations << val_method
@ -40,4 +40,4 @@ module Report::Validation
end
end
end
end

Loading…
Cancel
Save