Added respond_to JS in ProductsController, and use $.getScript. Made correction in the index action