fix for error.add_to_base deprecated in rails 3