So this is my Products controller
class ProductsController < AuthenticatedController
def index
= ShopifyAPI::Product.find(:all, params: { limit: 10 })
render(json: { products: })
end
end
And this is how I want to display the products in views/products/index.html.erb:
## Products
<% .each do |p| %>
<%= p.title %>
<% end %>
And my route:
get '/products', :to => 'products#index'
But when I redirect my page to /products, I get this message:
Which doesn’t happen with all my other routes, so what am I doing wrong? Am I missing something?
