CRUDIn_Juties
This commit is contained in:
@@ -28,7 +28,7 @@ class Origami::InJutiesController < BaseOrigamiController
|
||||
|
||||
respond_to do |format|
|
||||
if @in_juty.save
|
||||
format.html { redirect_to @in_juty, notice: 'In juty was successfully created.' }
|
||||
format.html { redirect_to origami_in_juties_path, notice: 'In juty was successfully created.' }
|
||||
format.json { render :show, status: :created, location: @in_juty }
|
||||
else
|
||||
format.html { render :new }
|
||||
@@ -42,7 +42,7 @@ class Origami::InJutiesController < BaseOrigamiController
|
||||
def update
|
||||
respond_to do |format|
|
||||
if @in_juty.update(in_juty_params)
|
||||
format.html { redirect_to @in_juty, notice: 'In juty was successfully updated.' }
|
||||
format.html { redirect_to origami_in_juty_path(@in_juty), notice: 'In juty was successfully updated.' }
|
||||
format.json { render :show, status: :ok, location: @in_juty }
|
||||
else
|
||||
format.html { render :edit }
|
||||
@@ -56,7 +56,7 @@ class Origami::InJutiesController < BaseOrigamiController
|
||||
def destroy
|
||||
@in_juty.destroy
|
||||
respond_to do |format|
|
||||
format.html { redirect_to in_juties_url, notice: 'In juty was successfully destroyed.' }
|
||||
format.html { redirect_to origami_in_juties_path, notice: 'In juty was successfully destroyed.' }
|
||||
format.json { head :no_content }
|
||||
end
|
||||
end
|
||||
@@ -69,6 +69,6 @@ class Origami::InJutiesController < BaseOrigamiController
|
||||
|
||||
# Never trust parameters from the scary internet, only allow the white list through.
|
||||
def in_juty_params
|
||||
params.fetch(:in_juty, {})
|
||||
params.require(:in_juty).permit(:dinning_id,:commissioner_ids,:in_time,:out_time)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user