OSDN Git Service

fix form extend
[pettanr/pettanr.git] / app / controllers / balloons_controller.rb
index 3237c7a..d7d4936 100644 (file)
@@ -1,13 +1,13 @@
 class BalloonsController < ApplicationController
   if Manifest.manifest.magic_numbers['run_mode'] == 0
-    before_filter :authenticate_user, :only => []
-    before_filter :authenticate_author, :only => []
+    before_filter :authenticate_user, :only => [:new, :edit, :create, :update, :destroy]
+    before_filter :authenticate_author, :only => [:new, :edit, :create, :update, :destroy]
   else
     before_filter :authenticate_reader, :only => [
       :index, :show, :by_speech_balloon, :count, :count_by_speech_balloon
     ]
-    before_filter :authenticate_user, :only => []
-    before_filter :authenticate_author, :only => []
+    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 => [:list, :browse]
   
@@ -46,4 +46,12 @@ class BalloonsController < ApplicationController
     list_count
   end
   
+  def new
+    form_new
+  end
+  
+  def edit
+    form_edit
+  end
+  
 end