A simple example of how AJAX works in Rails 3