Zone and OQS
This commit is contained in:
@@ -10,6 +10,8 @@ class Settings::ZonesController < ApplicationController
|
||||
# GET /settings/zones/1
|
||||
# GET /settings/zones/1.json
|
||||
def show
|
||||
@settings_tables = @settings_zone.tables
|
||||
@settings_rooms = @settings_zone.rooms
|
||||
end
|
||||
|
||||
# GET /settings/zones/new
|
||||
@@ -28,7 +30,7 @@ class Settings::ZonesController < ApplicationController
|
||||
|
||||
respond_to do |format|
|
||||
if @settings_zone.save
|
||||
format.html { redirect_to @settings_zone, notice: 'Zone was successfully created.' }
|
||||
format.html { redirect_to settings_zone_path(@settings_zone), notice: 'Zone was successfully created.' }
|
||||
format.json { render :show, status: :created, location: @settings_zone }
|
||||
else
|
||||
format.html { render :new }
|
||||
@@ -42,7 +44,7 @@ class Settings::ZonesController < ApplicationController
|
||||
def update
|
||||
respond_to do |format|
|
||||
if @settings_zone.update(settings_zone_params)
|
||||
format.html { redirect_to @settings_zone, notice: 'Zone was successfully updated.' }
|
||||
format.html { redirect_to settings_zone_path(@settings_zone), notice: 'Zone was successfully updated.' }
|
||||
format.json { render :show, status: :ok, location: @settings_zone }
|
||||
else
|
||||
format.html { render :edit }
|
||||
@@ -56,7 +58,7 @@ class Settings::ZonesController < ApplicationController
|
||||
def destroy
|
||||
@settings_zone.destroy
|
||||
respond_to do |format|
|
||||
format.html { redirect_to settings_zones_url, notice: 'Zone was successfully destroyed.' }
|
||||
format.html { redirect_to settings_zones_path, notice: 'Zone was successfully destroyed.' }
|
||||
format.json { head :no_content }
|
||||
end
|
||||
end
|
||||
@@ -69,6 +71,6 @@ class Settings::ZonesController < ApplicationController
|
||||
|
||||
# Never trust parameters from the scary internet, only allow the white list through.
|
||||
def settings_zone_params
|
||||
params.require(:settings_zone).permit(:name, :is_active, :created_by)
|
||||
params.require(:zone).permit(:name, :is_active, :created_by)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user