update table box
This commit is contained in:
@@ -2,6 +2,7 @@ class Origami::SurveysController < BaseOrigamiController
|
||||
def new
|
||||
@survey = Survey.new
|
||||
@id = params[:id]
|
||||
@cashier_type = params[:type]
|
||||
|
||||
if(@id[0,3] == "SAL")
|
||||
@sale = Sale.find(@id)
|
||||
@@ -20,8 +21,14 @@ class Origami::SurveysController < BaseOrigamiController
|
||||
|
||||
def create
|
||||
@dining_facility = DiningFacility.find(params[:table_id])
|
||||
@url = "/origami/"+@dining_facility.type.downcase+"/"+params[:table_id]
|
||||
|
||||
|
||||
@type = params[:cashier_type]
|
||||
@sale_id = params[:sale_id]
|
||||
if @type == "quick_service"
|
||||
@url = "/origami/sale/"+@sale_id+"/"+@type+"/payment"
|
||||
else
|
||||
@url = "/origami/"+@dining_facility.type.downcase+"/"+params[:table_id]
|
||||
end
|
||||
@survey = Survey.new(survey_params)
|
||||
@survey.foreigner = params["survey"]["foreigner"].to_json
|
||||
# respond_to do |format|
|
||||
|
||||
Reference in New Issue
Block a user