Add CheckName function on application_controller