Rails and AJAX practice