OSDN Git Service

v07
[pettanr/pettanr.git] / app / controllers / speeches_controller.rb
index 601444d..6248d6c 100644 (file)
@@ -1,36 +1,35 @@
 class SpeechesController < ApplicationController
   if Manifest.manifest.magic_numbers['run_mode'] == 0
-    before_filter :authenticate_user, :only => [:new, :edit, :create, :update, :destroy]
-    before_filter :authenticate_author, :only => [:new, :edit, :create, :update, :destroy]
+    before_action :authenticate_user, :only => [:new, :edit, :create, :update, :destroy]
+    before_action :authenticate_author, :only => [:new, :edit, :create, :update, :destroy]
   else
-    before_filter :authenticate_reader, :only => [
-      :index, :show, :count, 
-      :by_author, :by_speech_balloon, :by_speech_balloon_template, :by_writing_format, 
-      :count_by_author, :count_by_speech_balloon, :count_by_speech_balloon_template, :count_by_writing_format
+    before_action :authenticate_reader, :only => [
+      :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]
+    before_action :authenticate_user, :only => [:new, :edit, :create, :update, :destroy]
+    before_action :authenticate_author, :only => [:new, :edit, :create, :update, :destroy]
   end
-  before_filter :authenticate_admin!, :only => []
+  before_action :authenticate_admin!, :only => []
   
   def index
     filer_list
   end
   
   def by_author
-    filer_list
+    filer_list param: params[:id]
   end
   
   def by_speech_balloon
-    filer_list
+    filer_list param: params[:id]
   end
   
   def by_speech_balloon_template
-    filer_list
+    filer_list param: params[:id]
   end
   
   def by_writing_format
-    filer_list
+    filer_list param: params[:id]
   end
   
   def show_html_format format
@@ -49,26 +48,6 @@ class SpeechesController < ApplicationController
     end
   end
   
-  def count
-    list_count
-  end
-  
-  def count_by_author
-    list_count
-  end
-  
-  def count_by_speech_balloon
-    list_count
-  end
-  
-  def count_by_speech_balloon_template
-    list_count
-  end
-  
-  def count_by_writing_format
-    list_count
-  end
-  
   def new
     form_new
   end