applies ajax to a simple rails app