OSDN Git Service

fix: server
[pettanr/pettanr.git] / app / controllers / sheet_panels_controller.rb
index 752fb28..aaa1969 100644 (file)
@@ -42,59 +42,4 @@ class SheetPanelsController < ApplicationController
     form_edit
   end
   
-  def create
-    @sheet_panel = SheetPanel.new 
-    @sheet_panel.supply_default
-    @sheet_panel.attributes = params[:sheet_panel]
-    @sheet_panel.overwrite @operators
-    @sheet = Sheet.edit(@sheet_panel.sheet_id, @operators) if @sheet_panel.sheet_id
-    @panel = Panel.show(@sheet_panel.panel_id, @operators) if @sheet_panel.panel_id
-    
-    respond_to do |format|
-      if @sheet_panel.store @operators
-        flash[:notice] = I18n.t('flash.notice.created', :model => SheetPanel.model_name.human)
-        format.html { redirect_to play_sheet_path(@sheet) }
-        format.json { render json: @sheet_panel.sheet_panel_as_json(@operators.author) }
-      else
-        flash[:notice] = I18n.t('flash.notice.not_created', :model => SheetPanel.model_name.human)
-        format.html { render action: "new" }
-        format.json { render json: @sheet_panel.errors, status: :unprocessable_entity }
-      end
-    end
-  end
-  
-  def update
-    @sheet_panel = SheetPanel.edit(params[:id], @operators)
-    ot = @sheet_panel.t
-    @sheet_panel.attributes = params[:sheet_panel]
-    @sheet_panel.overwrite @operators
-    @sheet = Sheet.edit(@sheet_panel.sheet_id, @operators) if @sheet_panel.sheet_id
-    respond_to do |format|
-      if @sheet_panel.store @operators, ot
-        flash[:notice] = I18n.t('flash.notice.updated', :model => SheetPanel.model_name.human)
-        format.html { redirect_to play_sheet_path(@sheet) }
-        format.json { head :ok }
-      else
-        flash[:notice] = I18n.t('flash.notice.not_updated', :model => SheetPanel.model_name.human)
-        format.html { render action: "edit" }
-        format.json { render json: @sheet_panel.errors, status: :unprocessable_entity }
-      end
-    end
-  end
-
-  def destroy
-    @sheet_panel = SheetPanel.edit(params[:id], @operators)
-    @sheet = Sheet.edit(@sheet_panel.sheet_id, @operators) if @sheet_panel.sheet_id
-    respond_to do |format|
-      if @sheet_panel.destroy_and_shorten
-        flash[:notice] = I18n.t('flash.notice.destroyed', :model => SheetPanel.model_name.human)
-        format.html { redirect_to play_sheet_path(@sheet) }
-        format.json { head :ok }
-      else
-        flash[:notice] = I18n.t('flash.notice.not_destroyed', :model => SheetPanel.model_name.human)
-        format.html { redirect_to sheet_panel_path(@sheet_panel) }
-        format.json { render json: @sheet_panel.errors, status: :unprocessable_entity }
-      end
-    end
-  end
 end