jquery api with rails api