CHANGED upcase_name to before_save and UPDATED find_by_code to update_all