OSDN Git Service

fix new element dialog
[pettanr/pettanr.git] / app / controllers / speeches_controller.rb
index 658f270..fb37d66 100644 (file)
@@ -4,16 +4,13 @@ class SpeechesController < ApplicationController
     before_filter :authenticate_author, :only => [:new, :edit, :create, :update, :destroy]
   else
     before_filter :authenticate_reader, :only => [
-      :index, :show, :by_author, :by_speech_balloon, :count, :count_by_author
+      :index, :show, 
+      :by_author, :by_speech_balloon, :by_speech_balloon_template, :by_writing_format 
     ]
     before_filter :authenticate_user, :only => [:new, :edit, :create, :update, :destroy]
     before_filter :authenticate_author, :only => [:new, :edit, :create, :update, :destroy]
   end
   before_filter :authenticate_admin!, :only => []
-
-  def self.model
-    Speech
-  end
   
   def index
     filer_list
@@ -27,6 +24,14 @@ class SpeechesController < ApplicationController
     filer_list
   end
   
+  def by_speech_balloon_template
+    filer_list
+  end
+  
+  def by_writing_format
+    filer_list
+  end
+  
   def show_html_format format
     format.html {
       @item.boosts 'post'
@@ -43,14 +48,6 @@ class SpeechesController < ApplicationController
     end
   end
   
-  def count
-    list_count
-  end
-  
-  def count_by_author
-    list_count
-  end
-  
   def new
     form_new
   end