diff --git a/app/controllers/products_controller.rb b/app/controllers/products_controller.rb index 301814ec4cd088aebc70f1a5ddd8eee09177e5fe..72c9f2cb4a4b19a9bfd9800fbf8daec7fe02503a 100644 --- a/app/controllers/products_controller.rb +++ b/app/controllers/products_controller.rb @@ -3,6 +3,7 @@ class ProductsController < ApplicationController # Display the table of products by date added def index @products = Product.all.order(created_at: :desc) + render stream: true end # Display a specific product given an ID diff --git a/app/controllers/sections_controller.rb b/app/controllers/sections_controller.rb index a797dbee5594ce23bd797f4d6c98ed1c9c890489..06f5b9f370b301584d9f866b74044e4e3c57d348 100644 --- a/app/controllers/sections_controller.rb +++ b/app/controllers/sections_controller.rb @@ -5,5 +5,6 @@ class SectionsController < ApplicationController def show @section = Section.find(params[:id]) @products = @section.products.order(created_at: :asc) + render stream: true end end