Task application with rails and javascript