cleaned up code for current_server helper method using rails actionpack methods