OSDN Git Service

add: oplg dialog
[pettanr/pettanr.git] / app / controllers / speech_balloon_templates_controller.rb
index 0b2d024..2499e6e 100644 (file)
@@ -3,7 +3,7 @@ class SpeechBalloonTemplatesController < ApplicationController
     before_filter :authenticate_user, :only => []
   else
     before_filter :authenticate_reader, :only => [
-      :index, :show, :by_panel, :by_system_picture, :count, :count_by_panel, :count_by_system_picture
+      :index, :show, :by_panel, :by_system_picture
     ]
     before_filter :authenticate_user, :only => []
   end
@@ -35,18 +35,6 @@ class SpeechBalloonTemplatesController < ApplicationController
     end
   end
   
-  def count
-    list_count
-  end
-  
-  def count_by_panel
-    list_count
-  end
-  
-  def count_by_system_picture
-    list_count
-  end
-  
   def new
     form_new
   end
@@ -56,12 +44,9 @@ class SpeechBalloonTemplatesController < ApplicationController
   end
   
   def destroy
-    @item = SpeechBalloonTemplate.find(params[:id])
-    @item.destroy
-
-    respond_to do |format|
-      format.html { redirect_to :action => :list }
-      format.json { head :ok }
-    end
+    set_model
+    @item = @my_model_class.edit(params[:id], @operators)
+    render_destroy '/' + @my_model_class.path_name
   end
+  
 end