From c245cee4d01c0b5514ab4d06d326824265494eee Mon Sep 17 00:00:00 2001 From: NyanLinHtut Date: Wed, 4 Mar 2020 12:18:01 +0630 Subject: [PATCH] fixed show/hide product at menu --- app/controllers/foodcourt/food_court_controller.rb | 3 +-- app/views/foodcourt/addorders/detail.html.erb | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app/controllers/foodcourt/food_court_controller.rb b/app/controllers/foodcourt/food_court_controller.rb index f6a94b9c..f1a86c9d 100644 --- a/app/controllers/foodcourt/food_court_controller.rb +++ b/app/controllers/foodcourt/food_court_controller.rb @@ -7,8 +7,7 @@ class Foodcourt::FoodCourtController < ApplicationController end end - def index - @product = Product.all + def index if params[:sale_id].present? sale =Sale.find(params[:sale_id]) if sale diff --git a/app/views/foodcourt/addorders/detail.html.erb b/app/views/foodcourt/addorders/detail.html.erb index 2ca6e52b..70d4603b 100644 --- a/app/views/foodcourt/addorders/detail.html.erb +++ b/app/views/foodcourt/addorders/detail.html.erb @@ -89,7 +89,7 @@