lib/universe_compiler/entity/validation.rb in universe_compiler-0.3.12 vs lib/universe_compiler/entity/validation.rb in universe_compiler-0.4.0
- old
+ new
@@ -51,9 +51,15 @@
else
invalid_for_constraint invalid, field_name, constraint_name, value
end
end
end
+ when :reverse_method
+ begin
+ send value[:actual_method] if value[:unique_result]
+ rescue UniverseCompiler::Error => uce
+ invalid_for_constraint invalid, value[:actual_method], constraint_name, value
+ end
else
UniverseCompiler.logger.warn "Cannot handle unknown constraint '#{constraint_name}'! Skipping..."
end
end
end