using serializer and passing @books_json on index action instead of doing a get request to the index action which is already available on page load (concepts of bootstrapping models)