InJutiesUpdate
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
class Origami::InJutiesController < BaseOrigamiController
|
||||
before_action :set_in_juty, only: [:show, :edit, :update,:edit_in_juty, :update_for_in_juty , :destroy ,:destroy_in_juty]
|
||||
before_action :set_in_juty, only: [:show, :edit, :update, :edit_in_juty, :update_for_in_juty , :destroy ,:destroy_in_juty]
|
||||
|
||||
# GET /in_juties
|
||||
# GET /in_juties.json
|
||||
@@ -9,6 +9,8 @@ class Origami::InJutiesController < BaseOrigamiController
|
||||
|
||||
def index_in_juty
|
||||
@juties_in= InJuty.where("dinning_id=?",params[:table_id])
|
||||
@table = params[:table_id]
|
||||
|
||||
end
|
||||
# GET /in_juties/1
|
||||
# GET /in_juties/1.json
|
||||
@@ -49,7 +51,7 @@ class Origami::InJutiesController < BaseOrigamiController
|
||||
end
|
||||
|
||||
def create_for_in_juty
|
||||
|
||||
@in_juty = InJuty.new
|
||||
@in_juty.dinning_id = params[:dining_id]
|
||||
@in_juty.commissioner_ids = params[:commissioner_ids]
|
||||
@in_juty.in_time = params[:in_time]
|
||||
@@ -77,7 +79,7 @@ class Origami::InJutiesController < BaseOrigamiController
|
||||
@in_juty.commissioner_ids = params[:commissioner_ids]
|
||||
@in_juty.in_time = params[:in_time]
|
||||
@in_juty.out_time = params[:out_time]
|
||||
@in_juty.update
|
||||
@in_juty.save
|
||||
end
|
||||
|
||||
# DELETE /in_juties/1
|
||||
@@ -91,9 +93,11 @@ class Origami::InJutiesController < BaseOrigamiController
|
||||
end
|
||||
|
||||
def destroy_in_juty
|
||||
@table_id = params[:table_id]
|
||||
@in_juty.destroy
|
||||
|
||||
respond_to do |format|
|
||||
format.html { redirect_to origami_in_juties_path, notice: 'In juty was successfully destroyed.' }
|
||||
format.html { redirect_to origami_index_in_juty_path(@table_id), notice: 'In juty was successfully destroyed.' }
|
||||
format.json { head :no_content }
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user