an exercise in using ajax in a rails app