Zone Created_at Bug Fix
This commit is contained in:
@@ -27,7 +27,7 @@ class Settings::ZonesController < ApplicationController
|
||||
# POST /settings/zones.json
|
||||
def create
|
||||
@settings_zone = Zone.new(settings_zone_params)
|
||||
|
||||
@settings_zone.created_by = current_login_employee.name
|
||||
respond_to do |format|
|
||||
if @settings_zone.save
|
||||
format.html { redirect_to settings_zone_path(@settings_zone), notice: 'Zone was successfully created.' }
|
||||
@@ -43,6 +43,7 @@ class Settings::ZonesController < ApplicationController
|
||||
# PATCH/PUT /settings/zones/1.json
|
||||
def update
|
||||
respond_to do |format|
|
||||
@settings_zone.created_by = current_login_employee.name
|
||||
if @settings_zone.update(settings_zone_params)
|
||||
format.html { redirect_to settings_zone_path(@settings_zone), notice: 'Zone was successfully updated.' }
|
||||
format.json { render :show, status: :ok, location: @settings_zone }
|
||||
@@ -56,6 +57,8 @@ class Settings::ZonesController < ApplicationController
|
||||
# DELETE /settings/zones/1
|
||||
# DELETE /settings/zones/1.json
|
||||
def destroy
|
||||
@settings_zone.rooms.destroy
|
||||
@settings_zone.tables.destroy
|
||||
@settings_zone.destroy
|
||||
respond_to do |format|
|
||||
format.html { redirect_to settings_zones_path, notice: 'Zone was successfully destroyed.' }
|
||||
|
||||
Reference in New Issue
Block a user