OSDN Git Service

t#:
[pettanr/pettanr.git] / app / controllers / balloons_controller.rb
index 12da158..3e97f89 100644 (file)
@@ -1,17 +1,14 @@
 class BalloonsController < 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, :by_author, :by_speech_balloon, :count, :count_by_author
+    before_action :authenticate_reader, :only => [
+      :index, :show, 
+      :by_author, :by_speech_balloon, :by_speech_balloon_template, :by_system_picture
     ]
-    before_filter :authenticate_user, :only => [:new, :edit, :create, :update, :destroy]
-    before_filter :authenticate_author, :only => [:new, :edit, :create, :update, :destroy]
-  end
-  
-  def self.model
-    Balloon
+    before_action :authenticate_user, :only => [:new, :edit, :create, :update, :destroy]
+    before_action :authenticate_author, :only => [:new, :edit, :create, :update, :destroy]
   end
   
   def index
@@ -19,11 +16,19 @@ class BalloonsController < ApplicationController
   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 param: params[:id]
+  end
+  
+  def by_system_picture
+    filer_list param: params[:id]
   end
   
   def show_html_format format
@@ -42,14 +47,6 @@ class BalloonsController < ApplicationController
     end
   end
   
-  def count
-    list_count
-  end
-  
-  def count_by_author
-    list_count
-  end
-  
   def new
     form_new
   end